Paul Mendoza
Paul Mendoza

Reputation: 5787

Are Typescript versions backwards compatible?

Will there be breaking changes to current TS code that I have already written in future releases of TS? I am on version 0.8.3 right now.

Upvotes: 11

Views: 4347

Answers (1)

Ryan Cavanaugh
Ryan Cavanaugh

Reputation: 220944

Yes (depending on what you've written, of course). TypeScript uses Semantic Versioning; until version 1.0 is declared, breaking changes are possible. For example, the syntax used for enum will be changing between 0.8.3 and 0.9.0, and there may be more changes between 0.9 and 1.0, though those will be kept to an absolute minimum. After 1.0, however, you can expect zero breaking changes (for practical purposes -- no guarantee that degenerate code that 'accidently' compiled due to a bug will remain so).

Our experience moving over some teams with very large codebases from 0.8.3 to 0.9.0 has been that the majority of post-0.8.3 'breaking' changes are just bugs that have been fixed in code that you wouldn't have expected to compile in the first place. In any type system there will be some disagreement about what a 'bug' really is, but code that is legal according to the 0.8.3 spec will almost certainly work in 0.9.

Upvotes: 4

Related Questions