typescript compiler use to check type when type is not given code example
Example 1: typescript check type
mySprite instanceof Sprite;
Example 2: typing in typescript
var name: string = "Anna";
let notes: (number | string)[] = ["Get Food", 23, "Call the previous number when betting"];