我正在做一个VueJS项目。我们刚刚实现了Typescript
(版本4.8.4)
.
我犯了这个错误
error TS5053: Option 'emitDeclarationOnly' cannot be specified with option 'noEmit'
在更新ts类型文件中的接口之后。
在我的
tsconfig
我们仅声明的文件
"emitDeclarationOnly": true,
但看起来
noEmit
与node_modules下的其他包一起声明。
以下是tsconfig文件的全部内容
{
"compilerOptions": {
"target": "es6",
"module": "es6",
"strict": true,
"jsx": "preserve",
"moduleResolution": "node",
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"sourceMap": true,
"noImplicitAny": false,
"baseUrl": ".",
"allowJs": true,
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"declaration": true,
"isolatedModules": true,
"emitDeclarationOnly": true,
"outDir": "tsdist",
"types": [
"webpack-env",
"jest"
],
"typeRoots": [
"./node_modules/@types",
],
"paths": {
"@/*": [
"src/*"
],
"AppCheckout/*": ["src/assets/scripts/AppComponent/Checkout/src/*"],
"AppCommon/*": ["src/assets/scripts/AppComponent/Common/src/*"],
"AppPublication/*": ["src/assets/scripts/AppComponent/Publication/src/*"],
"AppStore/*": ["src/assets/scripts/AppComponent/Store/src/*"]
},
"lib": [
"esnext",
"dom",
"dom.iterable",
"scripthost"
]
},
"include": [
"src/**/*.ts",
"src/**/*.tsx",
"src/**/*.vue",
"tests/**/*.ts",
"tests/**/*.tsx"
, "src/assets/scripts/globals/Container/Core/initContainer.js" ],
"exclude": [
"node_modules",
"./tasks"
],
"vueCompilerOptions": {
"target": 2.7
}
}