Update error code
This commit is contained in:
parent
6626a99f11
commit
64501996cc
|
@ -2655,7 +2655,7 @@
|
|||
},
|
||||
"Cannot iterate value because the 'next' method of its iterator expects type '{1}', but for-of will always send '{0}'.": {
|
||||
"category": "Error",
|
||||
"code": 2673
|
||||
"code": 2763
|
||||
},
|
||||
"Cannot iterate value because the 'next' method of its iterator expects type '{1}', but array spread will always send '{0}'.": {
|
||||
"category": "Error",
|
||||
|
|
|
@ -35,43 +35,43 @@ tests/cases/compiler/operationsAvailableOnPromisedType.ts(27,5): error TS2349: T
|
|||
a | b;
|
||||
~
|
||||
!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.
|
||||
!!! related TS2763 tests/cases/compiler/operationsAvailableOnPromisedType.ts:11:9: Did you forget to use 'await'?
|
||||
!!! related TS2773 tests/cases/compiler/operationsAvailableOnPromisedType.ts:11:9: Did you forget to use 'await'?
|
||||
b | a;
|
||||
~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.
|
||||
!!! related TS2763 tests/cases/compiler/operationsAvailableOnPromisedType.ts:12:5: Did you forget to use 'await'?
|
||||
!!! related TS2773 tests/cases/compiler/operationsAvailableOnPromisedType.ts:12:5: Did you forget to use 'await'?
|
||||
a + b;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '+' cannot be applied to types 'number' and 'Promise<number>'.
|
||||
!!! related TS2763 tests/cases/compiler/operationsAvailableOnPromisedType.ts:13:5: Did you forget to use 'await'?
|
||||
!!! related TS2773 tests/cases/compiler/operationsAvailableOnPromisedType.ts:13:5: Did you forget to use 'await'?
|
||||
a > b;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '>' cannot be applied to types 'number' and 'Promise<number>'.
|
||||
!!! related TS2763 tests/cases/compiler/operationsAvailableOnPromisedType.ts:14:5: Did you forget to use 'await'?
|
||||
!!! related TS2773 tests/cases/compiler/operationsAvailableOnPromisedType.ts:14:5: Did you forget to use 'await'?
|
||||
b++;
|
||||
~
|
||||
!!! error TS2356: An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type.
|
||||
!!! related TS2763 tests/cases/compiler/operationsAvailableOnPromisedType.ts:15:5: Did you forget to use 'await'?
|
||||
!!! related TS2773 tests/cases/compiler/operationsAvailableOnPromisedType.ts:15:5: Did you forget to use 'await'?
|
||||
--b;
|
||||
~
|
||||
!!! error TS2356: An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type.
|
||||
!!! related TS2763 tests/cases/compiler/operationsAvailableOnPromisedType.ts:16:7: Did you forget to use 'await'?
|
||||
!!! related TS2773 tests/cases/compiler/operationsAvailableOnPromisedType.ts:16:7: Did you forget to use 'await'?
|
||||
a === b;
|
||||
~~~~~~~
|
||||
!!! error TS2367: This condition will always return 'false' since the types 'number' and 'Promise<number>' have no overlap.
|
||||
!!! related TS2763 tests/cases/compiler/operationsAvailableOnPromisedType.ts:17:5: Did you forget to use 'await'?
|
||||
!!! related TS2773 tests/cases/compiler/operationsAvailableOnPromisedType.ts:17:5: Did you forget to use 'await'?
|
||||
[...c];
|
||||
~
|
||||
!!! error TS2461: Type 'Promise<string[]>' is not an array type.
|
||||
!!! related TS2763 tests/cases/compiler/operationsAvailableOnPromisedType.ts:18:9: Did you forget to use 'await'?
|
||||
!!! related TS2773 tests/cases/compiler/operationsAvailableOnPromisedType.ts:18:9: Did you forget to use 'await'?
|
||||
for (const s of c) {
|
||||
~
|
||||
!!! error TS2495: Type 'Promise<string[]>' is not an array type or a string type.
|
||||
!!! related TS2763 tests/cases/compiler/operationsAvailableOnPromisedType.ts:19:21: Did you forget to use 'await'?
|
||||
!!! related TS2773 tests/cases/compiler/operationsAvailableOnPromisedType.ts:19:21: Did you forget to use 'await'?
|
||||
fn(b, b, c, d, e, f, g);
|
||||
~
|
||||
!!! error TS2345: Argument of type 'Promise<number>' is not assignable to parameter of type 'number'.
|
||||
!!! related TS2763 tests/cases/compiler/operationsAvailableOnPromisedType.ts:20:12: Did you forget to use 'await'?
|
||||
!!! related TS2773 tests/cases/compiler/operationsAvailableOnPromisedType.ts:20:12: Did you forget to use 'await'?
|
||||
d.prop;
|
||||
~~~~
|
||||
!!! error TS2570: Property 'prop' does not exist on type 'Promise<{ prop: string; }>'. Did you forget to use 'await'?
|
||||
|
@ -79,23 +79,23 @@ tests/cases/compiler/operationsAvailableOnPromisedType.ts(27,5): error TS2349: T
|
|||
for await (const s of c) {}
|
||||
~
|
||||
!!! error TS2495: Type 'Promise<string[]>' is not an array type or a string type.
|
||||
!!! related TS2763 tests/cases/compiler/operationsAvailableOnPromisedType.ts:23:27: Did you forget to use 'await'?
|
||||
!!! related TS2773 tests/cases/compiler/operationsAvailableOnPromisedType.ts:23:27: Did you forget to use 'await'?
|
||||
e();
|
||||
~
|
||||
!!! error TS2349: This expression is not callable.
|
||||
!!! error TS2349: Type 'Promise<() => void>' has no call signatures.
|
||||
!!! related TS2763 tests/cases/compiler/operationsAvailableOnPromisedType.ts:24:5: Did you forget to use 'await'?
|
||||
!!! related TS2773 tests/cases/compiler/operationsAvailableOnPromisedType.ts:24:5: Did you forget to use 'await'?
|
||||
f();
|
||||
~
|
||||
!!! error TS2349: This expression is not callable.
|
||||
!!! error TS2349: Not all constituents of type 'Promise<() => void> | (() => void)' are callable.
|
||||
!!! error TS2349: Type 'Promise<() => void>' has no call signatures.
|
||||
!!! related TS2763 tests/cases/compiler/operationsAvailableOnPromisedType.ts:25:5: Did you forget to use 'await'?
|
||||
!!! related TS2773 tests/cases/compiler/operationsAvailableOnPromisedType.ts:25:5: Did you forget to use 'await'?
|
||||
new g();
|
||||
~
|
||||
!!! error TS2351: This expression is not constructable.
|
||||
!!! error TS2351: Type 'Promise<new () => any>' has no construct signatures.
|
||||
!!! related TS2763 tests/cases/compiler/operationsAvailableOnPromisedType.ts:26:9: Did you forget to use 'await'?
|
||||
!!! related TS2773 tests/cases/compiler/operationsAvailableOnPromisedType.ts:26:9: Did you forget to use 'await'?
|
||||
b();
|
||||
~
|
||||
!!! error TS2349: This expression is not callable.
|
||||
|
|
|
@ -72,7 +72,7 @@ tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.es2018.2.ts(
|
|||
yield* Promise.resolve([1, 2]);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2504: Type 'Promise<number[]>' must have a '[Symbol.asyncIterator]()' method that returns an async iterator.
|
||||
!!! related TS2789 tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.es2018.2.ts:8:12: Did you forget to use 'await'?
|
||||
!!! related TS2773 tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.es2018.2.ts:8:12: Did you forget to use 'await'?
|
||||
}
|
||||
const assignability1: () => AsyncIterableIterator<number> = async function * () {
|
||||
~~~~~~~~~~~~~~
|
||||
|
|
Loading…
Reference in a new issue