当前位置:网站首页>Type checking for typescript

Type checking for typescript

2022-06-21 18:27:00 CupidoZ

 Insert picture description here

Typescript When types are incompatible, there will be a type checking mechanism to avoid type errors

//  below :number Namely ts Unique type annotations   Used to control the type checking of variables 

let num:number = 888888;



num=420;

In this way, we can make js This weakly typed language performs strong type checking and then generates more rigorous logic js file , In order to improve the js Logical rigor of

Test it out , You will find that strict type checking is involved in the coding process

原网站

版权声明
本文为[CupidoZ]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/172/202206211651295080.html