check instance type typescript code example Example: typescript check type mySprite instanceof Sprite;