There is no float
type in Typescript. All numbers are from the type number
.
If you want to cast an string
as number you can simply do it with the +
operator. Example:
myNumberString: string = "25";
myNumber: number = +myNumberString;
There is no float
type in Typescript. All numbers are from the type number
.
If you want to cast an string
as number you can simply do it with the +
operator. Example:
myNumberString: string = "25";
myNumber: number = +myNumberString;