Skip to content

Disallow decorators on abstract/declare fields#17949

Merged
nicolo-ribaudo merged 3 commits into
babel:mainfrom
nicolo-ribaudo:stricter-decorators
May 1, 2026
Merged

Disallow decorators on abstract/declare fields#17949
nicolo-ribaudo merged 3 commits into
babel:mainfrom
nicolo-ribaudo:stricter-decorators

Conversation

@nicolo-ribaudo
Copy link
Copy Markdown
Member

Q                       A
Fixed Issues? Fixes #1, Fixes #2
Patch: Bug Fix?
Major: Breaking Change?
Minor: New Feature?
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes?
License MIT

@babel-bot
Copy link
Copy Markdown
Collaborator

babel-bot commented Apr 24, 2026

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/61428

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 24, 2026

Open in StackBlitz

commit: 7469dd6

@nicolo-ribaudo
Copy link
Copy Markdown
Member Author

@fisker About the prettier failure, do you think you could change the test to either:

  • accept the recoverable error, or
  • use readonly instead of abstract?

@nicolo-ribaudo nicolo-ribaudo force-pushed the stricter-decorators branch from d18ef0d to 7469dd6 Compare May 1, 2026 16:01
@nicolo-ribaudo
Copy link
Copy Markdown
Member Author

@fisker Actually, prettier should probably just ignore the DecoratorAbstractMethod error code (it's how I'm patching Prettier in our tests)

@nicolo-ribaudo nicolo-ribaudo merged commit 67e82be into babel:main May 1, 2026
101 of 102 checks passed
@nicolo-ribaudo nicolo-ribaudo deleted the stricter-decorators branch May 1, 2026 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: typescript pkg: parser PR: Spec Compliance 👓 A type of pull request used for our changelog categories Spec: Decorators

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants