|
|
|
|
|
by ClayFerguson
3448 days ago
|
|
If you want to trade contrarian jabs, I can play that game: TypeScript does far more than 'mitigate symptoms of type unsafeness' it is a fully type-safe language that will get proper compile-time errors if you use the wrong type. It doesn't "mitigate" unsafeness. It ELIMINATES unsafeness. |
|
A Google query for the definition of unsound: "not safe or robust"
https://www.typescriptlang.org/docs/handbook/type-compatibil...
You're portraying TypeScript as if it's perfect. Typescript is is permissive and structurally, rather than nominally typed. This is not TypeScript's fault. There will always be tradeoffs. Among other things in the FAQ, there is a section on how to prevent two types from being structurally incompatible. "A possible FIX if you really want two types to be incompatible is to add a 'brand' member"...
https://github.com/Microsoft/TypeScript/wiki/FAQ#type-system...