typescript function type checking code example
Example 1: typescript check type
mySprite instanceof Sprite;
Example 2: typescript get type
if (typeof abc === "number") {
// do something
}
mySprite instanceof Sprite;
if (typeof abc === "number") {
// do something
}