3 ms·
If TypeScript is used against bog-standard JS code, I can definitely appreciate your point. For me, TypeScript really started to shine once I started taking a
by lscharen 7y ago
If TypeScript is used against bog-standard JS code, I can definitely appreciate your point.
For me, TypeScript really started to shine once I started taking advantage its generic support, higher-level utility types like Pick<> and Optional<> (and really anything involving keyof), and creating static type checks via the unknown and never types.
This is especially effective when working on legacy JS code bases where unit tests and other good engineering principles were not used well, or at all.