typescript provides type checking at code example Example: typescript check type mySprite instanceof Sprite;