mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-10 06:41:59 -06:00
Merge pull request #7409 from anilanar/allowOutWithNoEmit
Fix #7397: Remove error checks for noEmit and out* compiler options combined.
This commit is contained in:
commit
74e498de03
@ -1746,24 +1746,7 @@ namespace ts {
|
||||
}
|
||||
}
|
||||
|
||||
if (options.noEmit) {
|
||||
if (options.out) {
|
||||
programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_0_cannot_be_specified_with_option_1, "noEmit", "out"));
|
||||
}
|
||||
|
||||
if (options.outFile) {
|
||||
programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_0_cannot_be_specified_with_option_1, "noEmit", "outFile"));
|
||||
}
|
||||
|
||||
if (options.outDir) {
|
||||
programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_0_cannot_be_specified_with_option_1, "noEmit", "outDir"));
|
||||
}
|
||||
|
||||
if (options.declaration) {
|
||||
programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_0_cannot_be_specified_with_option_1, "noEmit", "declaration"));
|
||||
}
|
||||
}
|
||||
else if (options.allowJs && options.declaration) {
|
||||
if (!options.noEmit && options.allowJs && options.declaration) {
|
||||
programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_0_cannot_be_specified_with_option_1, "allowJs", "declaration"));
|
||||
}
|
||||
|
||||
|
||||
@ -0,0 +1,6 @@
|
||||
=== tests/cases/compiler/a.ts ===
|
||||
|
||||
class c {
|
||||
>c : Symbol(c, Decl(a.ts, 0, 0))
|
||||
}
|
||||
|
||||
@ -0,0 +1,6 @@
|
||||
=== tests/cases/compiler/a.ts ===
|
||||
|
||||
class c {
|
||||
>c : c
|
||||
}
|
||||
|
||||
@ -0,0 +1,6 @@
|
||||
=== tests/cases/compiler/a.ts ===
|
||||
|
||||
class c {
|
||||
>c : Symbol(c, Decl(a.ts, 0, 0))
|
||||
}
|
||||
|
||||
@ -0,0 +1,6 @@
|
||||
=== tests/cases/compiler/a.ts ===
|
||||
|
||||
class c {
|
||||
>c : c
|
||||
}
|
||||
|
||||
@ -0,0 +1,6 @@
|
||||
=== tests/cases/compiler/a.ts ===
|
||||
|
||||
class c {
|
||||
>c : Symbol(c, Decl(a.ts, 0, 0))
|
||||
}
|
||||
|
||||
@ -0,0 +1,6 @@
|
||||
=== tests/cases/compiler/a.ts ===
|
||||
|
||||
class c {
|
||||
>c : c
|
||||
}
|
||||
|
||||
@ -0,0 +1,6 @@
|
||||
=== tests/cases/compiler/a.ts ===
|
||||
|
||||
class c {
|
||||
>c : Symbol(c, Decl(a.ts, 0, 0))
|
||||
}
|
||||
|
||||
@ -0,0 +1,6 @@
|
||||
=== tests/cases/compiler/a.ts ===
|
||||
|
||||
class c {
|
||||
>c : c
|
||||
}
|
||||
|
||||
@ -0,0 +1,6 @@
|
||||
// @declaration: true
|
||||
// @noEmit: true
|
||||
// @fileName: a.ts
|
||||
|
||||
class c {
|
||||
}
|
||||
6
tests/cases/compiler/compilerOptionsOutAndNoEmit.ts
Normal file
6
tests/cases/compiler/compilerOptionsOutAndNoEmit.ts
Normal file
@ -0,0 +1,6 @@
|
||||
// @out: outDir
|
||||
// @noEmit: true
|
||||
// @fileName: a.ts
|
||||
|
||||
class c {
|
||||
}
|
||||
6
tests/cases/compiler/compilerOptionsOutDirAndNoEmit.ts
Normal file
6
tests/cases/compiler/compilerOptionsOutDirAndNoEmit.ts
Normal file
@ -0,0 +1,6 @@
|
||||
// @outDir: outDir
|
||||
// @noEmit: true
|
||||
// @fileName: a.ts
|
||||
|
||||
class c {
|
||||
}
|
||||
6
tests/cases/compiler/compilerOptionsOutFileAndNoEmit.ts
Normal file
6
tests/cases/compiler/compilerOptionsOutFileAndNoEmit.ts
Normal file
@ -0,0 +1,6 @@
|
||||
// @outFile: a.js
|
||||
// @noEmit: true
|
||||
// @fileName: a.ts
|
||||
|
||||
class c {
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user