Type de vérification de la variable TypeScript
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