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
You can find the definition of ClassDeclarationhere. Note that there doesn't exist a field for decorators even though it exists for several other nodes such as ClassAccessorProperty and ClassMethod.
However, it is possible to have a class decorator such as the following:
@sealed
class BugReport {
type = "report";
title: string;
constructor(t: string) {
this.title = t;
}
}
In this case, the decorators field does exist on ClassDeclaration. Can we update the types to reflect this?
The text was updated successfully, but these errors were encountered:
gaggarwal-patreon
changed the title
ClassDeclaration is missing decorators
ClassDeclaration type is missing decorators
May 10, 2023
PR #660 has had this ready to go for two years. This really needs to be merged, as there's no shortage of angular code that makes use of class decorators.
I'll add that right now ChatGPT is generating jscodeshift codemods that rely on this functionality being present.
You can find the definition of
ClassDeclaration
here. Note that there doesn't exist a field fordecorators
even though it exists for several other nodes such asClassAccessorProperty
andClassMethod
.However, it is possible to have a class decorator such as the following:
In this case, the
decorators
field does exist onClassDeclaration
. Can we update the types to reflect this?The text was updated successfully, but these errors were encountered: