DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR TYPESCRIPT
typescript check type of variable
if (fooOrBar instanceof Foo){ // TypeScript now knows that `fooOrBar` is `Foo` }
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#typescript
#check
#type
#variable
ADD COMMENT
Topic
COMMENT
Name
5+6 =
Submit