当前位置:网站首页>Typescript variable

Typescript variable

2022-08-06 07:06:56non-pool

1. If multiple global variables are initialized, an error will be reported.

 

2. ts will automatically infer the type of the variable, but the type of the variable passed as a parameter is any, any type.

If the type is set, you can see the error at compile time, The type of the return value will be inferred.

No need to automatically infer the needAdd the return value manuallyType:

原网站

版权声明
本文为[non-pool]所创,转载请带上原文链接,感谢
https://chowdera.com/2022/218/202208060638479013.html

随机推荐