官术网_书友最值得收藏!

Variable typing

In vanilla JavaScript, we would do something like this:

x = 20; 
// after a few meaningful minutes
x = 'nah! It's not a number any more';

But in TypeScript, we cannot do as shown in the preceding code snippet, the TypeScript compiler would complain as we are modifying the variable type at runtime.

主站蜘蛛池模板: 江源县| 曲松县| 扶风县| 夏津县| 永福县| 哈尔滨市| 噶尔县| 全州县| 夏邑县| 宝清县| 阿克| 铜鼓县| 商洛市| 慈溪市| 富顺县| 霸州市| 郑州市| 康马县| 长治市| 福安市| 祁门县| 会同县| 隆安县| 云安县| 柳河县| 广德县| 深泽县| 左贡县| 东安县| 泽州县| 吉木乃县| 洛南县| 洪湖市| 三明市| 茌平县| 个旧市| 固始县| 阿鲁科尔沁旗| 墨江| 桑植县| 喀喇沁旗|