TypeScript学习笔记
TypeScript笔记对象类型对象类型的几种形式类型注解(type annotation)类型推断(type inference)
对象类型
对象类型的几种形式
对象类型
any string number boolean null undefined symbol void
const demo: string = "Hello World";
数组类型
在基础类型后面加上[]变为对应对象的数组类型
const demo: string[] = ["Hello","World"];
原创
2020-12-01 09:52:21 ·
335 阅读 ·
0 评论