|
|
|
|
|
by bioemerl
1100 days ago
|
|
Honestly typescript is fine, just give me: Standard library that isn't worthless - no more npm package spam. Type knowledge in the runtime. It doesn't have to be typed, just make it so I don't have to do crazy checks on properties before casting to a class. Imports without webpack. |
|
You do have 'instanceof' at runtime, so unless you mean some other type of 'class', casting to a class is really a non-issue (and you don't really 'cast'... since dynamic typing and all). If you mean some more advanced concept (e.g., structural type runtime checking), think how you would do it in statically typed languages (is it really better?).