// Type assertions - change an 'any' type to a more specific type let someValue: any = "this is a string"; let strLength: number = (<string>someValue).length; // or let strLength2: number = (someValue as string).length;
// Type assertions - change an 'any' type to a more specific type let someValue: any = "this is a string"; let strLength: number = (<string>someValue).length; // or let strLength2: number = (someValue as string).length;
Comments