SemVer for TS in Practice – real world example of avoiding breaking changes
v5.chriskrycho.com
v5.chriskrycho.com
In practice, it's somewhat more annoying:
1. TypeScript itself ships breaking changes semi-regularly in its own minor releases, so libraries need to do additional work to buffer their consumers from the impact of those (which is what this represented). That, in turn, means library authors need to understand those and have testing in place to account for it.
2. I said "90%" for a reason: the fact that TS has type inference (but not something like Hindley-Milner), a fully structural type system with a bunch of dependent type-adjacent features and control flow analysis for the types means you basically have to model it as higher-kinded mutability, which is… interesting! But complicated.
Net: most folks can get a long way by doing some pretty simple things, and the spec outlines that. If you're maintaining a more complicated library and really want to insulate your users from breaking changes outside your own actual major versions, you might have a bit more to do.