experimentalDecorators support incomplete
See original GitHub issueWhat version of Next.js are you using?
12.0.8-canary.13
What version of Node.js are you using?
v14
What browser are you using?
n/a
What operating system are you using?
macOS
How are you deploying your application?
other
Describe the Bug
After removing the babelrc and setting experimentalDecorators to true in compiler options, the build fails with error…
“Error: error: Using the export keyword between a decorator and a class is not allowed. Please use export @dec class
instead.”
Granted, maybe should begin refactoring our legacy decorators anyway, but this should work right?
old .bablerc has…
"plugins": [["@babel/plugin-proposal-decorators", {"legacy": true}]]
jsconfig.json has…
{
"compilerOptions" {
"experimentalDecorators": true
}
}
Expected Behavior
Project builds. Currently the build fails with above error.
To Reproduce
function wrapComponent(Component) {
return (props) => <Component {...props} imDecorated />
}
@wrapComponent
export default class MyComponent extends Component {
render() { return <div />; }
}
Issue Analytics
- State:
- Created 2 years ago
- Comments:5
Top Results From Across the Web
Experimental decorators warning in TypeScript compilation
Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option `to remove this ......
Read more >How to remove experimentalDecorators warning in VSCode
Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option to remove this ......
Read more >[Editor:VSCode] Using decorators in native class syntax ...
... in native class syntax throws experimentalDecorators error #9050 ... enable the experimental decorator support in eslint configuration).
Read more >Solving warning: “Experimental support for decorators is a ...
Set the 'experimentalDecorators' option in your 'tsconfig' or 'jsconfig' to remove this warning”. This article describes how to solve this warning that could...
Read more >grunt-ts - npm
Sets a root for output of transformed-to-TypeScript HTML files. See detailed explanation of grunt-ts HTML template support. //Note: incomplete - ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Also seeing this in the latest 12.1.0 version.
We ended up refactoring them all to use redux compose instead. Lot’s of files to change but all pretty straightforward.