Skip to content

Commit bb615ac

Browse files
committed
Add declarationDir to excludeSpec
1 parent 5ca375c commit bb615ac

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/compiler/commandLineParser.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1607,10 +1607,13 @@ namespace ts {
16071607
createCompilerDiagnosticOnlyIfJson(Diagnostics.Compiler_option_0_requires_a_value_of_type_1, "exclude", "Array");
16081608
}
16091609
}
1610-
else {
1611-
const outDir = raw.compilerOptions && raw.compilerOptions.outDir;
1612-
if (outDir) {
1613-
excludeSpecs = [outDir];
1610+
else if (raw.compilerOptions) {
1611+
const outDir = raw.compilerOptions.outDir;
1612+
const declarationDir = raw.compilerOptions.declarationDir;
1613+
const excludeDirs = [outDir, declarationDir].filter(dir => dir);
1614+
1615+
if (excludeDirs.length) {
1616+
excludeSpecs = excludeDirs;
16141617
}
16151618
}
16161619

0 commit comments

Comments
 (0)