Skip to content

Commit

Permalink
allow tsconfig to contain emitDeclarationOnly=true
Browse files Browse the repository at this point in the history
  • Loading branch information
entropitor committed Jan 11, 2022
1 parent 9673858 commit c6bc87f
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ function verifyTypeScriptSetup() {
},
resolveJsonModule: { value: true, reason: 'to match webpack loader' },
isolatedModules: { value: true, reason: 'implementation limitation' },
noEmit: { value: true },
jsx: {
parsedValue:
hasJsxRuntime && semver.gte(ts.version, '4.1.0-beta')
Expand Down Expand Up @@ -220,6 +219,11 @@ function verifyTypeScriptSetup() {
firstTimeSetup = true;
}

if (parsedCompilerOptions['emitDeclarationOnly'] != null) {
compilerOptions['emitDeclarationOnly'] = { value: true };
} else {
compilerOptions['noEmit'] = { value: true };
}
for (const option of Object.keys(compilerOptions)) {
const { parsedValue, value, suggested, reason } = compilerOptions[option];

Expand Down

0 comments on commit c6bc87f

Please sign in to comment.