3 ms·
> TS can't know about your "classes" - they're a runtime thing. Treating them the same as interfaces can make this much nicer. It helps sticking mostly to inte
by heisenbit 7y ago
> TS can't know about your "classes" - they're a runtime thing. Treating them the same as interfaces can make this much nicer.
It helps sticking mostly to interfaces as it helps managing expectations. Class information gets discarded during compilation and that brings with it some quirks. Java Generics is another example where type erasure leads to quirky surprises.