在Typescript中,表示断言有两种方式。一种是扩号表示法:
let someValue: any = "this is a string"; let strLength: number = (someValue).length;
另一种使用as关键字:
let someValue: any = "this is a string"; let strLength: number = (someValue as string).length;标签:jira,string,19,关键字,let,someValue,断言 From: https://www.cnblogs.com/yao-655442/p/16760365.html