Last active
October 29, 2017 16:34
-
-
Save yuya-takeyama/07a4d29a3bf57e6e1d6f96cf93730407 to your computer and use it in GitHub Desktop.
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
var x: string | number = Math.random() > 0.5 ? 42 : 'forty-two'; | |
var y: typeof x; | |
y = 's'; | |
console.log(x); // => 42 or forty-two | |
console.log(y); // => s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment