ts is string code example
Example 1: display true if the parameter is type string
if (typeof myVar === 'string' || myVar instanceof String)
// it's a string
else
// it's something else
Example 2: typescript object type
//is not strict mode
let endedCoord: {x: number, y: number} = {
x: -1,
y: -1,
}