Fix instanceOf mistake (#4322)
instanceof is a runtime check and interface and types don't exist during runtime. Also TypeScript has a structural type system, which means that they are matched according to the structure of the object and types - not according to instances. For example: interface Person { name: string; age: number } const person = { name: "Ken", age: 25 } if (person instanceof Person) // Errorpull/4324/head
parent
08e29c2c14
commit
ea70632de1
1 changed files with 1 additions and 1 deletions
Loading…
Reference in new issue