Skip to content

Commit 6450199

Browse files
committed
Update error code
1 parent 6626a99 commit 6450199

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

src/compiler/diagnosticMessages.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2655,7 +2655,7 @@
26552655
},
26562656
"Cannot iterate value because the 'next' method of its iterator expects type '{1}', but for-of will always send '{0}'.": {
26572657
"category": "Error",
2658-
"code": 2673
2658+
"code": 2763
26592659
},
26602660
"Cannot iterate value because the 'next' method of its iterator expects type '{1}', but array spread will always send '{0}'.": {
26612661
"category": "Error",

tests/baselines/reference/operationsAvailableOnPromisedType.errors.txt

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -35,67 +35,67 @@ tests/cases/compiler/operationsAvailableOnPromisedType.ts(27,5): error TS2349: T
3535
a | b;
3636
~
3737
!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.
38-
!!! related TS2763 tests/cases/compiler/operationsAvailableOnPromisedType.ts:11:9: Did you forget to use 'await'?
38+
!!! related TS2773 tests/cases/compiler/operationsAvailableOnPromisedType.ts:11:9: Did you forget to use 'await'?
3939
b | a;
4040
~
4141
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.
42-
!!! related TS2763 tests/cases/compiler/operationsAvailableOnPromisedType.ts:12:5: Did you forget to use 'await'?
42+
!!! related TS2773 tests/cases/compiler/operationsAvailableOnPromisedType.ts:12:5: Did you forget to use 'await'?
4343
a + b;
4444
~~~~~
4545
!!! error TS2365: Operator '+' cannot be applied to types 'number' and 'Promise<number>'.
46-
!!! related TS2763 tests/cases/compiler/operationsAvailableOnPromisedType.ts:13:5: Did you forget to use 'await'?
46+
!!! related TS2773 tests/cases/compiler/operationsAvailableOnPromisedType.ts:13:5: Did you forget to use 'await'?
4747
a > b;
4848
~~~~~
4949
!!! error TS2365: Operator '>' cannot be applied to types 'number' and 'Promise<number>'.
50-
!!! related TS2763 tests/cases/compiler/operationsAvailableOnPromisedType.ts:14:5: Did you forget to use 'await'?
50+
!!! related TS2773 tests/cases/compiler/operationsAvailableOnPromisedType.ts:14:5: Did you forget to use 'await'?
5151
b++;
5252
~
5353
!!! error TS2356: An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type.
54-
!!! related TS2763 tests/cases/compiler/operationsAvailableOnPromisedType.ts:15:5: Did you forget to use 'await'?
54+
!!! related TS2773 tests/cases/compiler/operationsAvailableOnPromisedType.ts:15:5: Did you forget to use 'await'?
5555
--b;
5656
~
5757
!!! error TS2356: An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type.
58-
!!! related TS2763 tests/cases/compiler/operationsAvailableOnPromisedType.ts:16:7: Did you forget to use 'await'?
58+
!!! related TS2773 tests/cases/compiler/operationsAvailableOnPromisedType.ts:16:7: Did you forget to use 'await'?
5959
a === b;
6060
~~~~~~~
6161
!!! error TS2367: This condition will always return 'false' since the types 'number' and 'Promise<number>' have no overlap.
62-
!!! related TS2763 tests/cases/compiler/operationsAvailableOnPromisedType.ts:17:5: Did you forget to use 'await'?
62+
!!! related TS2773 tests/cases/compiler/operationsAvailableOnPromisedType.ts:17:5: Did you forget to use 'await'?
6363
[...c];
6464
~
6565
!!! error TS2461: Type 'Promise<string[]>' is not an array type.
66-
!!! related TS2763 tests/cases/compiler/operationsAvailableOnPromisedType.ts:18:9: Did you forget to use 'await'?
66+
!!! related TS2773 tests/cases/compiler/operationsAvailableOnPromisedType.ts:18:9: Did you forget to use 'await'?
6767
for (const s of c) {
6868
~
6969
!!! error TS2495: Type 'Promise<string[]>' is not an array type or a string type.
70-
!!! related TS2763 tests/cases/compiler/operationsAvailableOnPromisedType.ts:19:21: Did you forget to use 'await'?
70+
!!! related TS2773 tests/cases/compiler/operationsAvailableOnPromisedType.ts:19:21: Did you forget to use 'await'?
7171
fn(b, b, c, d, e, f, g);
7272
~
7373
!!! error TS2345: Argument of type 'Promise<number>' is not assignable to parameter of type 'number'.
74-
!!! related TS2763 tests/cases/compiler/operationsAvailableOnPromisedType.ts:20:12: Did you forget to use 'await'?
74+
!!! related TS2773 tests/cases/compiler/operationsAvailableOnPromisedType.ts:20:12: Did you forget to use 'await'?
7575
d.prop;
7676
~~~~
7777
!!! error TS2570: Property 'prop' does not exist on type 'Promise<{ prop: string; }>'. Did you forget to use 'await'?
7878
}
7979
for await (const s of c) {}
8080
~
8181
!!! error TS2495: Type 'Promise<string[]>' is not an array type or a string type.
82-
!!! related TS2763 tests/cases/compiler/operationsAvailableOnPromisedType.ts:23:27: Did you forget to use 'await'?
82+
!!! related TS2773 tests/cases/compiler/operationsAvailableOnPromisedType.ts:23:27: Did you forget to use 'await'?
8383
e();
8484
~
8585
!!! error TS2349: This expression is not callable.
8686
!!! error TS2349: Type 'Promise<() => void>' has no call signatures.
87-
!!! related TS2763 tests/cases/compiler/operationsAvailableOnPromisedType.ts:24:5: Did you forget to use 'await'?
87+
!!! related TS2773 tests/cases/compiler/operationsAvailableOnPromisedType.ts:24:5: Did you forget to use 'await'?
8888
f();
8989
~
9090
!!! error TS2349: This expression is not callable.
9191
!!! error TS2349: Not all constituents of type 'Promise<() => void> | (() => void)' are callable.
9292
!!! error TS2349: Type 'Promise<() => void>' has no call signatures.
93-
!!! related TS2763 tests/cases/compiler/operationsAvailableOnPromisedType.ts:25:5: Did you forget to use 'await'?
93+
!!! related TS2773 tests/cases/compiler/operationsAvailableOnPromisedType.ts:25:5: Did you forget to use 'await'?
9494
new g();
9595
~
9696
!!! error TS2351: This expression is not constructable.
9797
!!! error TS2351: Type 'Promise<new () => any>' has no construct signatures.
98-
!!! related TS2763 tests/cases/compiler/operationsAvailableOnPromisedType.ts:26:9: Did you forget to use 'await'?
98+
!!! related TS2773 tests/cases/compiler/operationsAvailableOnPromisedType.ts:26:9: Did you forget to use 'await'?
9999
b();
100100
~
101101
!!! error TS2349: This expression is not callable.

tests/baselines/reference/types.asyncGenerators.es2018.2.errors.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.es2018.2.ts(
7272
yield* Promise.resolve([1, 2]);
7373
~~~~~~~~~~~~~~~~~~~~~~~
7474
!!! error TS2504: Type 'Promise<number[]>' must have a '[Symbol.asyncIterator]()' method that returns an async iterator.
75-
!!! related TS2789 tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.es2018.2.ts:8:12: Did you forget to use 'await'?
75+
!!! related TS2773 tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.es2018.2.ts:8:12: Did you forget to use 'await'?
7676
}
7777
const assignability1: () => AsyncIterableIterator<number> = async function * () {
7878
~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)