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

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.

主站蜘蛛池模板: 凤城市| 横峰县| 运城市| 东宁县| 深水埗区| 论坛| 安国市| 松江区| 台北市| 鱼台县| 宁蒗| 湘潭市| 宁晋县| 长沙县| 铁力市| 清水县| 玉环县| 思茅市| 益阳市| 台中市| 洞头县| 福泉市| 宜兰市| 哈密市| 双鸭山市| 永州市| 论坛| 香河县| 鄂伦春自治旗| 日土县| 蒲城县| 枣强县| 罗平县| 大理市| 中山市| 柳江县| 新野县| 文成县| 平陆县| 和平区| 长治市|