interface仅包含数据
class 包含数据和方法
interface有父类的含义?
1 | tsc ext5.ts |
通过编译,进一步降低js的门槛,同时,也提前避免了解释型语言错误
any类型
void
1 | let unusable: void = undefined; |
never类型
The never
type represents the type of values that never occur. The never
type is a subtype of, and assignable to, every type; however, no type is a subtype of, or assignable to, never
(except never
itself).
1 | let someValue: any = "this is a string"; |