Skip to content

Commit 4b6adb8

Browse files
authored
Merge pull request microsoft#22444 from obany/master
Fix typo in emitDeclarationOnly error message for declaration required
2 parents 6959bda + bcf6e34 commit 4b6adb8

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/compiler/program.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2201,7 +2201,7 @@ namespace ts {
22012201

22022202
if (options.emitDeclarationOnly) {
22032203
if (!options.declaration) {
2204-
createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "emitDeclarationOnly", "declarations");
2204+
createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "emitDeclarationOnly", "declaration");
22052205
}
22062206

22072207
if (options.noEmit) {
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
error TS5052: Option 'emitDeclarationOnly' cannot be specified without specifying option 'declarations'.
1+
error TS5052: Option 'emitDeclarationOnly' cannot be specified without specifying option 'declaration'.
22

33

4-
!!! error TS5052: Option 'emitDeclarationOnly' cannot be specified without specifying option 'declarations'.
4+
!!! error TS5052: Option 'emitDeclarationOnly' cannot be specified without specifying option 'declaration'.
55
==== tests/cases/compiler/hello.ts (0 errors) ====
66
var hello = "yo!";
77

tests/baselines/reference/declFileEmitDeclarationOnlyError2.errors.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
error TS5052: Option 'emitDeclarationOnly' cannot be specified without specifying option 'declarations'.
1+
error TS5052: Option 'emitDeclarationOnly' cannot be specified without specifying option 'declaration'.
22
error TS5053: Option 'emitDeclarationOnly' cannot be specified with option 'noEmit'.
33

44

5-
!!! error TS5052: Option 'emitDeclarationOnly' cannot be specified without specifying option 'declarations'.
5+
!!! error TS5052: Option 'emitDeclarationOnly' cannot be specified without specifying option 'declaration'.
66
!!! error TS5053: Option 'emitDeclarationOnly' cannot be specified with option 'noEmit'.
77
==== tests/cases/compiler/hello.ts (0 errors) ====
88
var hello = "yo!";

0 commit comments

Comments
 (0)