typescript force object tpye code example
Example 1: typescript object type
//is not strict mode
let endedCoord: {x: number, y: number} = {
x: -1,
y: -1,
}
Example 2: angular type of string
if(typeof myVariable === 'string'){
//do
}
//is not strict mode
let endedCoord: {x: number, y: number} = {
x: -1,
y: -1,
}
if(typeof myVariable === 'string'){
//do
}