Skip to content

Commit b31b0eb

Browse files
authored
Use single quotes consistently in diagnostic messages. (#43634)
1 parent 37035da commit b31b0eb

File tree

49 files changed

+457
-457
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+457
-457
lines changed

src/compiler/diagnosticMessages.json

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1192,7 +1192,7 @@
11921192
"category": "Message",
11931193
"code": 1390
11941194
},
1195-
"The `bundledPackageName` option must be provided when using outFile and node module resolution with declaration emit.": {
1195+
"The 'bundledPackageName' option must be provided when using outFile and node module resolution with declaration emit.": {
11961196
"category": "Error",
11971197
"code": 1391
11981198
},
@@ -2362,7 +2362,7 @@
23622362
"category": "Error",
23632363
"code": 2549
23642364
},
2365-
"Property '{0}' does not exist on type '{1}'. Do you need to change your target library? Try changing the `lib` compiler option to '{2}' or later.": {
2365+
"Property '{0}' does not exist on type '{1}'. Do you need to change your target library? Try changing the 'lib' compiler option to '{2}' or later.": {
23662366
"category": "Error",
23672367
"code": 2550
23682368
},
@@ -2482,15 +2482,15 @@
24822482
"category": "Error",
24832483
"code": 2582
24842484
},
2485-
"Cannot find name '{0}'. Do you need to change your target library? Try changing the `lib` compiler option to '{1}' or later.": {
2485+
"Cannot find name '{0}'. Do you need to change your target library? Try changing the 'lib' compiler option to '{1}' or later.": {
24862486
"category": "Error",
24872487
"code": 2583
24882488
},
2489-
"Cannot find name '{0}'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.": {
2489+
"Cannot find name '{0}'. Do you need to change your target library? Try changing the 'lib' compiler option to include 'dom'.": {
24902490
"category": "Error",
24912491
"code": 2584
24922492
},
2493-
"'{0}' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.": {
2493+
"'{0}' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.": {
24942494
"category": "Error",
24952495
"code": 2585
24962496
},
@@ -2514,15 +2514,15 @@
25142514
"category": "Error",
25152515
"code": 2590
25162516
},
2517-
"Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add `node` to the types field in your tsconfig.": {
2517+
"Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig.": {
25182518
"category": "Error",
25192519
"code": 2591
25202520
},
2521-
"Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery` and then add `jquery` to the types field in your tsconfig.": {
2521+
"Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery` and then add 'jquery' to the types field in your tsconfig.": {
25222522
"category": "Error",
25232523
"code": 2592
25242524
},
2525-
"Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig.": {
2525+
"Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig.": {
25262526
"category": "Error",
25272527
"code": 2593
25282528
},
@@ -2864,7 +2864,7 @@
28642864
"category": "Error",
28652865
"code": 2696
28662866
},
2867-
"An async function or method must return a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your `--lib` option.": {
2867+
"An async function or method must return a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your '--lib' option.": {
28682868
"category": "Error",
28692869
"code": 2697
28702870
},
@@ -2896,7 +2896,7 @@
28962896
"category": "Error",
28972897
"code": 2704
28982898
},
2899-
"An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option.": {
2899+
"An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option.": {
29002900
"category": "Error",
29012901
"code": 2705
29022902
},
@@ -2920,11 +2920,11 @@
29202920
"category": "Error",
29212921
"code": 2710
29222922
},
2923-
"A dynamic import call returns a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your `--lib` option.": {
2923+
"A dynamic import call returns a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your '--lib' option.": {
29242924
"category": "Error",
29252925
"code": 2711
29262926
},
2927-
"A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option.": {
2927+
"A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option.": {
29282928
"category": "Error",
29292929
"code": 2712
29302930
},
@@ -3862,7 +3862,7 @@
38623862
"category": "Error",
38633863
"code": 5073
38643864
},
3865-
"Option '--incremental' can only be specified using tsconfig, emitting to single file or when option `--tsBuildInfoFile` is specified.": {
3865+
"Option '--incremental' can only be specified using tsconfig, emitting to single file or when option '--tsBuildInfoFile' is specified.": {
38663866
"category": "Error",
38673867
"code": 5074
38683868
},
@@ -3914,7 +3914,7 @@
39143914
"category": "Error",
39153915
"code": 5086
39163916
},
3917-
"A labeled tuple element is declared as rest with a `...` before the name, rather than before the type.": {
3917+
"A labeled tuple element is declared as rest with a '...' before the name, rather than before the type.": {
39183918
"category": "Error",
39193919
"code": 5087
39203920
},
@@ -4845,7 +4845,7 @@
48454845
"category": "Message",
48464846
"code": 6237
48474847
},
4848-
"Specify the module specifier to be used to import the `jsx` and `jsxs` factory functions from. eg, react": {
4848+
"Specify the module specifier to be used to import the 'jsx' and 'jsxs' factory functions from. eg, react": {
48494849
"category": "Error",
48504850
"code": 6238
48514851
},
@@ -5230,7 +5230,7 @@
52305230
"category": "Error",
52315231
"code": 7039
52325232
},
5233-
"If the '{0}' package actually exposes this module, consider sending a pull request to amend 'https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/{1}`": {
5233+
"If the '{0}' package actually exposes this module, consider sending a pull request to amend 'https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/{1}'": {
52345234
"category": "Error",
52355235
"code": 7040
52365236
},
@@ -5391,7 +5391,7 @@
53915391
"category": "Error",
53925392
"code": 8024
53935393
},
5394-
"Class declarations cannot have more than one `@augments` or `@extends` tag.": {
5394+
"Class declarations cannot have more than one '@augments' or '@extends' tag.": {
53955395
"category": "Error",
53965396
"code": 8025
53975397
},

tests/baselines/reference/ES5For-ofTypeCheck10.errors.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck10.ts(9,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
1+
tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck10.ts(9,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
22
tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck10.ts(14,15): error TS2495: Type 'StringIterator' is not an array type or a string type.
33

44

@@ -13,7 +13,7 @@ tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck10.ts(14,1
1313
}
1414
[Symbol.iterator]() {
1515
~~~~~~
16-
!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
16+
!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
1717
return this;
1818
}
1919
}

tests/baselines/reference/ES5SymbolProperty2.errors.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
tests/cases/conformance/Symbols/ES5SymbolProperty2.ts(10,11): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
1+
tests/cases/conformance/Symbols/ES5SymbolProperty2.ts(10,11): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
22

33

44
==== tests/cases/conformance/Symbols/ES5SymbolProperty2.ts (1 errors) ====
@@ -13,4 +13,4 @@ tests/cases/conformance/Symbols/ES5SymbolProperty2.ts(10,11): error TS2585: 'Sym
1313

1414
(new M.C)[Symbol.iterator];
1515
~~~~~~
16-
!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
16+
!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
tests/cases/conformance/Symbols/ES5SymbolProperty6.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
2-
tests/cases/conformance/Symbols/ES5SymbolProperty6.ts(5,9): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
1+
tests/cases/conformance/Symbols/ES5SymbolProperty6.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
2+
tests/cases/conformance/Symbols/ES5SymbolProperty6.ts(5,9): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
33

44

55
==== tests/cases/conformance/Symbols/ES5SymbolProperty6.ts (2 errors) ====
66
class C {
77
[Symbol.iterator]() { }
88
~~~~~~
9-
!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
9+
!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
1010
}
1111

1212
(new C)[Symbol.iterator]
1313
~~~~~~
14-
!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
14+
!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.

tests/baselines/reference/argumentsObjectIterator02_ES5.errors.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
tests/cases/compiler/argumentsObjectIterator02_ES5.ts(2,26): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
1+
tests/cases/compiler/argumentsObjectIterator02_ES5.ts(2,26): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
22

33

44
==== tests/cases/compiler/argumentsObjectIterator02_ES5.ts (1 errors) ====
55
function doubleAndReturnAsArray(x: number, y: number, z: number): [number, number, number] {
66
let blah = arguments[Symbol.iterator];
77
~~~~~~
8-
!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
8+
!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
99

1010
let result = [];
1111
for (let arg of blah()) {

tests/baselines/reference/asyncFunctionNoReturnType.errors.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
error TS2468: Cannot find global value 'Promise'.
2-
tests/cases/compiler/asyncFunctionNoReturnType.ts(1,1): error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option.
2+
tests/cases/compiler/asyncFunctionNoReturnType.ts(1,1): error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option.
33

44

55
!!! error TS2468: Cannot find global value 'Promise'.
66
==== tests/cases/compiler/asyncFunctionNoReturnType.ts (1 errors) ====
77
async () => {
88
~~~~~~~~~~~~~
9-
!!! error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option.
9+
!!! error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option.
1010
if (window)
1111
return;
1212
}

tests/baselines/reference/asyncFunctionReturnExpressionErrorSpans.errors.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
tests/cases/compiler/asyncFunctionReturnExpressionErrorSpans.ts(11,28): error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option.
1+
tests/cases/compiler/asyncFunctionReturnExpressionErrorSpans.ts(11,28): error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option.
22
tests/cases/compiler/asyncFunctionReturnExpressionErrorSpans.ts(16,21): error TS2322: Type 'number' is not assignable to type 'string'.
33

44

@@ -15,7 +15,7 @@ tests/cases/compiler/asyncFunctionReturnExpressionErrorSpans.ts(16,21): error TS
1515

1616
async function asyncFoo(): Promise<Foo> {
1717
~~~~~~~~~~~~
18-
!!! error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option.
18+
!!! error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option.
1919
return {
2020
bar: {
2121
baz: {

0 commit comments

Comments
 (0)