if (typeof abc === "number") { // do something }
class Foo {} class Bar {} // Later if (fooOrBar instanceof Foo){ // TypeScript now knows that `fooOrBar` is `Foo` }