Re:TypeScript’s quirks: How inconsistencies make the languag...
by blobs on Saturday February 01, 2020 @05:36AM
(#22209822)
Whatever words you use, it simply conflicts with basic JS and is a serious flaw.
What is this strange protective behavior towards TS, can we stick to logic please?
[ Parent
| on HN ]
Re:TypeScript’s quirks: How inconsistencies make the languag...
by redmorphium on Saturday February 01, 2020 @06:25AM
(#22209968)
instanceof checks the prototype chain, which is a different concept from type. Prototype chains are dynamic and exist at runtime, while Typescript types are a static concept.