Skip to content

Implement the updated JS decorators proposal #48885

Closed
@arackaf

Description

@arackaf

Suggestion

Implement Decorators!

🔍 Search Terms

TypeScript Decorators

List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily and help provide feedback.

Decorators

✅ Viability Checklist

My suggestion meets these guidelines:

  • This wouldn't be a breaking change in existing TypeScript/JavaScript code
  • This wouldn't change the runtime behavior of existing JavaScript code
  • This could be implemented without emitting different JS based on the types of the expressions
  • This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
  • This feature would agree with the rest of TypeScript's Design Goals.

Not sure - this would be badly breaking against your legacy decorators feature, but I think it meets the goal to align TS with JS

⭐ Suggestion

The TypeScript proposal is now Stage 3!!!

https://github.com/tc39/proposal-decorators

We've all seen the issue from hell requesting better typing support for decorators

#4881

but now that the proposal is moving forward, currently at Stage 3, I thought I'd open this issue to see if there are plans to finally, fully implement (and type) the ES version of decorators.

📃 Motivating Example

N/A - just implementing new JS features, to keep JS and TS aligned.

💻 Use Cases

All the various ways decorators can be used.

Metadata

Metadata

Labels

CommittedThe team has roadmapped this issueFix AvailableA PR has been opened for this issueIn DiscussionNot yet reached consensusSuggestionAn idea for TypeScript

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions