类型断言有两种形式 1. 尖括号语法 (value) let someValue: any = "this is a string"; let strLength: number = (<string>someValue).length; 2. as 语法 (value as Type): let someValue: any = "this is a string"; let strLength: number = (someValue as string).length;