摘要: 定义:类型断言好比其它语言里的类型转换,但是不进行特殊的数据检查和解构; 语法:<类型>值 或者 值 as 类型 举例说明 1.<类型>值 let someValue: any = "this is a string"; let strLength: number = (<string>someVa 阅读全文
posted @ 2020-01-06 17:49 Mir.zhao 阅读(3333) 评论(0) 推荐(0) 编辑