Skip to content

Instantly share code, notes, and snippets.

@Logiraptor
Created February 6, 2018 20:04
Show Gist options
  • Save Logiraptor/9162d0776ab3d328669895553cdc94f0 to your computer and use it in GitHub Desktop.
Save Logiraptor/9162d0776ab3d328669895553cdc94f0 to your computer and use it in GitHub Desktop.
Failure reproduction
export function broken1(callback: (x: any) => void, value1: string) {
return callback(() => console.log(value1))
}
export function broken2(callback: any, value2: string) {
return callback(() => console.log(value2))
}
export function working(callback: (x: () => void) => void, value3: string) {
return callback(() => console.log(value3))
}
{
"dependencies": {
"typescript": "^2.7.1"
}
}
{
"compilerOptions": {
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noEmit": true
},
"files": [
"./main.ts"
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment