Skip to content

ClassDeclaration type is missing decorators #938

@gaggarwal-patreon

Description

@gaggarwal-patreon

You can find the definition of ClassDeclaration here. 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions