-
-
Notifications
You must be signed in to change notification settings - Fork 591
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
experimentalDecorators: true
in tsconfig.json is not working
#567
Comments
I cannot reproduce this, can you provide a repo? |
If you don't mind, you can checkout https://github.com/JounQin/Rubick/blob/master/src/views/landing/Login.vue for more details. |
@HerringtonDarkholme Oops, it really works today, but custom options for Vue plugin still does not work. There declarations are all in |
@JounQin I still cannot reproduce. Clicking on $v directs me to shim.d.ts. |
Hmmm... I restarted my Mac and it works just well now, so magically. |
@HerringtonDarkholme It seems if I modify global .d.ts file, vetur will not recognize that unless exiting and restarting vsc. So is it as expected and should be documented? |
I'm not sure if this is an issue of the language server or the VSCode plugin, but it doesn't work when you have a Workspace open. There is a workaround tho: Simply add a tsconfig.json to the workspace directory with the proper configuration. Then this will fix the issue in workspaces. |
Still not working in a vue file with tsconfig |
The issue is tracked here: #424 |
Actually, I'm still confused with the cause of this issue, but set "include" path in tsconfig.json is working for me. Before: "include": [
// "src/**/*.ts"
] Worked After: {
"compileOnSave": true,
"compilerOptions": {
"module": "esnext",
"moduleResolution": "node",
"target": "es5",
"lib": ["dom", "es2015", "es2016"],
"sourceMap": false,
"declaration": true,
"experimentalDecorators": true,
"jsx": "react",
"outDir": "lib",
"noUnusedLocals": false
},
"exclude": [
"node_modules",
"static",
"lib"
],
"include": [
"src/**/*.ts"
]
} I'm happy if somebody can point out my mistakes in the config file. |
|
It was not resolved by any of the above solutions, but it was fixed by updating |
I have latest version but I still can see the error when I do |
I just put "experimentalDecorators": true in tsconfig.json |
If you set, please restart VSCode. |
It's solved my problem. 🤗🤗 |
For majority of you, it's caused by
It needs to be without
|
It worked. |
Info
Problem
message: 'Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option to remove this warning.'
I've add and enable
experimentalDecorators
option in tsconfig.json, and I tried decorator in pure .ts file, there was no warnings.Reproducible Case
My source code:
The text was updated successfully, but these errors were encountered: