TypeScript should allow declarations to be compatible with older versions. #37478
Closed
5 tasks done
Labels
Duplicate
An existing issue was already created
Search Terms
semver
Suggestion
We would like to use TypeScript 3.8 and emit declaration files compatible with TypeScript 3.4
Use Cases
Many of our users can't upgrade their TypeScript version because they are using a version mandated by another tool, especially Angular. We want to be able to use the newest TypeScript on out source to gain additional features, but that should be isolated from the outputs of our project that other projects consume.
The particular motivation for this request is that my project upgraded to TypeScript 3.8, which emits property accessors in declaration files. We have multiple reports from users that this broke their builds with TypeScript 3.4 with the message "An accessor cannot be declared in an ambient context.".
Examples
Checklist
My suggestion meets these guidelines:
The text was updated successfully, but these errors were encountered: