Simple Typescript: declare static
property errors on build (but static declare
works)
#11145
Labels
area: typescript
i: bug
outdated
A closed issue/PR that is archived due to age. Recommended to make a new issue
pkg: parser
Bug Report
Current Behavior
Building simple typescript with
declare static
properties fails. Switching tostatic declare
succeeds. Both are valid TypeScript syntax. Prettier enforcesdeclare static
by default (which matches how I instinctively write it), fwiw.Input Code
Expected behavior/code
It should compile. Instead I get the following error:
This feature was introduced in #10484.
Babel Configuration (babel.config.js, .babelrc, package.json#babel, cli command, .eslintrc)
The relevant bit:
"@babel/plugin-transform-typescript", { allowDeclareFields: true }
Environment
The text was updated successfully, but these errors were encountered: