Тип типовой проверки переменной
if (fooOrBar instanceof Foo){
// TypeScript now knows that `fooOrBar` is `Foo`
}
Dotch
if (fooOrBar instanceof Foo){
// TypeScript now knows that `fooOrBar` is `Foo`
}
if (typeof abc === "number") {
// do something
}
200000000000000000000000000000000000