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

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.

主站蜘蛛池模板: 湛江市| 兴仁县| 白朗县| 巴彦淖尔市| 新晃| 桦川县| 湖口县| 德安县| 新闻| 湾仔区| 花莲市| 黎城县| 革吉县| 邵武市| 延长县| 桐梓县| 方城县| 蒙自县| 鹿泉市| 昌吉市| 建阳市| 伊宁市| 武义县| 两当县| 武汉市| 墨玉县| 万安县| 周至县| 普兰店市| 兰西县| 夏津县| 伊吾县| 彰武县| 青州市| 洞头县| 都昌县| 辽源市| 崇阳县| 资源县| 北碚区| 隆子县|