TS知识点脑图

https://blog.csdn.net/qq_27318177/article/details/124857123

 

https://juejin.cn/post/7031787942691471396

 

一、TS中的!用法

1. 属性或参数中使用 ?:表示该属性或参数为可选项

2. 属性或参数中使用 !:表示强制解析(告诉typescript编译器,这里一定有值),常用于vue-decorator中的@Prop

3. 变量后使用 !:表示类型推断排除null、undefined

posted @ 2022-09-28 16:16  LouisVuitt  阅读(55)  评论(0)    收藏  举报