Like on the picture below, when I write export default @Decorator class, vscode told me the syntax is wrong. How can I remove this error?
Update:
Yes, I know there are a lot of answer about how to enable decorator in vscode, but I really would like how to enable the decorator after the export default
.
I just add the configuration in jsconfig.json . That's not work.
{
"compilerOptions": {
"experimentalDecorators": true
}
}
Try adding below code in config-overrides.js, for other configuration please check https://code.visualstudio.com/docs/languages/jsconfig#_jsconfig-options
{
"compilerOptions": {
"experimentalDecorators": true
}
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.