You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Angular Non AOT compiler doesn't emit class decorators in specific cases #39574
Given that AOT is disabled ("aot": false in angular.json)
Given a class that is responsible of configuring "class decorators", if I decorate a regular typescript class with a decorator generated by that class, the compiled javascript doesn't emit the class decorator properly.
class DecoratorBuilder {
customClassDecorator<T extends { new (...args: any[]): {} }>(constructor: T) {
console.log('Class Decorated');
return class extends constructor {
myName = 'Decorated Foobar';
};
}
}
export function ClassDecorators() {
return new DecoratorBuilder();
}
@ClassDecorators().customClassDecorator
class MyNonAngularClass {
myName = 'foobar';
}
I think that this is more related to the CLI processing than the framework compilation. But @alan-agius4 is looking into it.
Transferring to the CLI repo...
Activity
petebacondarwin commentedon Nov 5, 2020
I think that this is more related to the CLI processing than the framework compilation. But @alan-agius4 is looking into it.
Transferring to the CLI repo...
petebacondarwin commentedon Nov 5, 2020
Actually it is caused by a transform (
constructorParametersDownlevelTransform) that is held in the FW repository. So transferring back!ratoaq2 commentedon Nov 5, 2020
Thanks for the quick response.
Is this kind of issue going to be fixed only on latest version 10.2.x? Or can I expect it to also be fixed on 10.0.x?
ahnpnl commentedon Nov 5, 2020
Hi, will this be fixed for v9 as well ? Downlevel transformer in v9 locates in CLI repo but I don't see any PRs to fix this issue there for v9.
petebacondarwin commentedon Nov 5, 2020
The PR for this issue will land on master, RC and patch branches. The patch branch is currently 10.2.x.
It will not be backported to 10.0.x nor 9.x.
fix(compiler-cli): do not drop non-Angular decorators when downleveli…
fix(compiler-cli): do not drop non-Angular decorators when downleveli…
angular-automatic-lock-bot commentedon Dec 7, 2020
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.