Last active
September 24, 2018 06:47
-
-
Save przemyslawjanpietrzak/a811ddbe3edb5d10bb1ea4ed3c044084 to your computer and use it in GitHub Desktop.
strictFunctionTypes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fn = (arg: number, cb: (string) => string) => { | |
return 42 | |
} | |
fn(42, a => a++); // Argument of type '(a: any) => number' is not assignable to parameter of type '(string: any) => string'. Type 'number' is not assignable to type 'string'. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment