Re:TypeScript’s quirks: How inconsistencies make the languag...
by alexcole on Friday January 31, 2020 @08:49PM
(#22207968)
Thats not 100% true in TypeScript. TypeScript actually only allows "up-casts" and "down-cast" (but if the type is neither a supertype nor a subtype the compiler will throw an error).
[ Parent
| on HN ]
Re:TypeScript’s quirks: How inconsistencies make the languag...
by seanmcdirmid on Friday January 31, 2020 @10:16PM
(#22208400)
Ya, I often have to write “this as any as T” because I’m using T as a self type.