Created
October 21, 2016 22:34
-
-
Save zwacky/372188f93c6a706c8b2680825f7758da to your computer and use it in GitHub Desktop.
TypeScript: string (primitive type) vs String (object type)
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 objectType: String = 'first string'; | |
let primitiveType: string = 'second string'; | |
objectType = primitiveType; // √ | |
primitiveType = objectType; // compiler error |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment