Answers for "how do you get typeof a variable in typescript?"

3

typescript check type of variable

if (fooOrBar instanceof Foo){
  // TypeScript now knows that `fooOrBar` is `Foo`
}
Posted by: Guest on December-03-2020

Code answers related to "how do you get typeof a variable in typescript?"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language