Skip to content

Instantly share code, notes, and snippets.

@przemyslawjanpietrzak
Last active September 24, 2018 06:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save przemyslawjanpietrzak/a811ddbe3edb5d10bb1ea4ed3c044084 to your computer and use it in GitHub Desktop.
Save przemyslawjanpietrzak/a811ddbe3edb5d10bb1ea4ed3c044084 to your computer and use it in GitHub Desktop.
strictFunctionTypes
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