Created
February 27, 2019 19:11
-
-
Save DaneSirois/23b1d844277dfefb841a6dc304132fca to your computer and use it in GitHub Desktop.
TypeScript - implicit variable typing
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
let myString = 'hello world'; // implicitly types variable as type 'string' | |
myString = 52; | |
//$ error: Type '52' is not assignable to type 'string' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment