string number typescript code example
Example 1: typescript string to number
var x = "32";
var y: number = +x;//the "+" converts string to number
Example 2: angular type of string
if(typeof myVariable === 'string'){
//do
}
var x = "32";
var y: number = +x;//the "+" converts string to number
if(typeof myVariable === 'string'){
//do
}