typescript check if type is specific subtype code example Example: typescript check type mySprite instanceof Sprite;