typescript for type checking only code example
Example 1: typescript check type
mySprite instanceof Sprite;
Example 2: use type as value typescript
Typescript interfaces aren''t being compiled into the js output, and you can not use them at runtime