No, upgrading to Angular 12.x.x will not help.
It's still deprecated.
The Typescript experimental decorators were based on TC39 proposal-decorators.
We use the same Decorators in our Angular codebase to create services, components and other Angular constructs.
But the same TC39 proposal has evolved in a different direction which is semantically not compatible with the experimental Typescript decorators.
The new spec for Decorators is easier to use and write.
This draft is still in stage-2 and may again change in the future.
You can find the detailed comparison between old and new decorators here.
Just finished up the first draft of the new decorators spec, pretty excited about it π https://t.co/ELhZbsiaiR
β The p is silent (@pzuraq) May 27, 2021
Does this mean that Typescript experimental decorators will not be compatible with Javascript decorators π¨
β Shivam (@shivamd20) May 27, 2021
Unfortunately no, the new proposal has differing semantics from previous proposals in a number of ways. TypeScript experimental decorators were also incompatible with the Define semantics class fields, which caused a decent amount of breakage in the ecosystem.
β The p is silent (@pzuraq) May 27, 2021
When the proposal advances, figuring out a step-by-step incremental upgrade path for existing decorators users is definitely going to be a priority though! No user left behind π
β The p is silent (@pzuraq) May 27, 2021
Let's just hope that this doesnβt result in fragmentation of JavaScript decorators. We have already faced a lot inconvenience due to commonsjs and ES6 imports.
Top comments (1)
It's the first thing i have think about when reading the new decorators draft, years ago , all the angular/mobx and project using decorators will deprecate