Skip to content

typescript: enable allowDeclareFields#171

Merged
AlexMost merged 1 commit into
ttag-org:masterfrom
pelme:push-lkvrtmrnoxxs
May 13, 2026
Merged

typescript: enable allowDeclareFields#171
AlexMost merged 1 commit into
ttag-org:masterfrom
pelme:push-lkvrtmrnoxxs

Conversation

@pelme
Copy link
Copy Markdown
Contributor

@pelme pelme commented May 12, 2026

The ordering of plugins/presets is important. Other plugins conflict with this setting. To overcome that problem, this commit also removes plugins that are no longer needed.

In babel 8.x, the allowDeclareFields is true by default and no longer configurable.

Removed plugins:

  • @babel/plugin-proposal-class-properties - enabled by default in preset-env
  • @babel/plugin-proposal-nullish-coalescing-operatory - enabled by default in preset-env
  • @babel/plugin-proposal-object-rest-spread - enabled by default in preset-env
  • @babel/plugin-transform-optional-chaining - enabled by default in preset-env
  • @babel/plugin-syntax-dynamic-import - enabled by default in preset-env
  • babel-preset-const-enum - preset-typescript supports this natively now (Support TypeScript const enums babel/babel#13324)

Fixes #170

@pelme pelme force-pushed the push-lkvrtmrnoxxs branch 2 times, most recently from 25c922f to 72a4dd1 Compare May 12, 2026 11:59
The ordering of plugins/presets is important. Other plugins conflict
with this setting. To overcome that problem, this commit also removes
plugins that are no longer needed.

In babel 8.x, the allowDeclareFields is true by default and no longer configurable.

Removed plugins:
- @babel/plugin-proposal-class-properties - enabled by default in preset-env
- @babel/plugin-proposal-nullish-coalescing-operatory - enabled by default in preset-env
- @babel/plugin-proposal-object-rest-spread - enabled by default in preset-env
- @babel/plugin-transform-optional-chaining - enabled by default in preset-env
- @babel/plugin-syntax-dynamic-import - enabled by default in preset-env
- babel-preset-const-enum - preset-typescript supports this natively now (babel/babel#13324)

Fixes ttag-org#170
@pelme pelme force-pushed the push-lkvrtmrnoxxs branch from 72a4dd1 to 218bce2 Compare May 12, 2026 12:00
@pelme
Copy link
Copy Markdown
Contributor Author

pelme commented May 13, 2026

this PR both drops old/legacy plugins and activates allowDeclareFields. let me know if you wish to split this up as separate PRs instead.

@AlexMost
Copy link
Copy Markdown
Member

Thanks for your contribution!

@AlexMost AlexMost merged commit 68daf09 into ttag-org:master May 13, 2026
1 check passed
@pelme pelme mentioned this pull request May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ttag extract fails for typescript declare in classes.

2 participants