-
Notifications
You must be signed in to change notification settings - Fork 26
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
tsconfig throws errors with TypeScript 5.0 #6
Comments
TypeScript in v5 emits a warning and this ends up in exit code 1. See vuejs/tsconfig#6 for more information. This CL will make TypeScript still end up in exit code 0 even tho these warnings are emitted until they fixed it upstream and released a new version of their config.
TypeScript 5.0 is out now. |
I'm using error TS5101: Option 'importsNotUsedAsValues' is deprecated and will stop functioning in TypeScript 5.5. Specify compilerOption '"ignoreDeprecations": "5.0"' to silence this error.
Use 'verbatimModuleSyntax' instead. {
"extends": "@tsconfig/node18-strictest",
"compilerOptions": {
"module": "esnext"
},
"ts-node": {
"esm": true
}
} |
+1 |
1 similar comment
+1 |
If you use TS 5.0 in package.json, e.g. "devDependencies": {
...
"typescript": "^5.0.3"
} then in your tsconfig.json you can now use Verbatim Module Syntax which replaces the two options, in their respective TSConfig Reference sections it says:
When you add it, you'll get another error:
So, in the end the following config worked for me: "compilerOptions": {
...
// "isolatedModules": true,
// "preserveValueImports": true,
// "importsNotUsedAsValues": "error",
"verbatimModuleSyntax": true,
} |
My tsconfig.app.json uses |
If you're using This worked for me: {
"extends": "@vue/tsconfig/tsconfig.web.json",
"compilerOptions": {
// workaround for https://github.com/vuejs/tsconfig/issues/6
"preserveValueImports": false,
"importsNotUsedAsValues": "remove",
"verbatimModuleSyntax": true,
// end workaround
},
} |
solved my problem |
Currently these two options are set:
importsNotUsedAsValues
andpreserveValueImports
:tsconfig/tsconfig.json
Lines 19 to 23 in 5b93351
which result with TypeScript 5.0-beta in an error.
Workaround:
in your config.
The text was updated successfully, but these errors were encountered: