Last active
July 9, 2019 00:28
-
-
Save methodbox/41c4f969d37e20ad50e3ed9bb20de405 to your computer and use it in GitHub Desktop.
TypeScript example for tooling
This file contains hidden or 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
let myNumber: number = 10; | |
let myString: string = 'this is a string'; | |
const badMath = (x: number, y: number) => { | |
return x * y; | |
} | |
badMath(myNumber, myString) /** | |
* error TS2345: Argument of type 'string' | |
* is not assignable to parameter of type 'number'. | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment