Skip to content

Cleanup decorators from types #11630

@fisker

Description

@fisker

Before You File a Proposal Please Confirm You Have Done The Following...

Relevant Package

ast-spec

My proposal is suitable for this project

  • I believe my proposal would be useful to the broader TypeScript community (meaning it is not a niche proposal).

Description

I was going to clean up the decorator print part in Prettier, because we check decorators on every node for some historical reason.

Currently, we have decorators in the following node types

  'AccessorProperty',
  'ArrayPattern',
  'AssignmentPattern',
  'ClassDeclaration',
  'ClassExpression',
  'Identifier',
  'MethodDefinition',
  'ObjectPattern',
  'PropertyDefinition',
  'RestElement',
  'TSAbstractAccessorProperty',
  'TSAbstractPropertyDefinition',
  'TSParameterProperty'

I don't think they are correct, but I don't know the correct answer either.

Additional Info

Same request in Babel babel/babel#17525

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestpackage: typescript-estreeIssues related to @typescript-eslint/typescript-estreewontfixThis will not be worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions