diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index c2585e6b40..c3396a7073 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -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", diff --git a/tests/baselines/reference/operationsAvailableOnPromisedType.errors.txt b/tests/baselines/reference/operationsAvailableOnPromisedType.errors.txt index 955bb3c295..0fc56b82c1 100644 --- a/tests/baselines/reference/operationsAvailableOnPromisedType.errors.txt +++ b/tests/baselines/reference/operationsAvailableOnPromisedType.errors.txt @@ -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'. -!!! 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'. -!!! 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' 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' 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' 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' 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' 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 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. diff --git a/tests/baselines/reference/types.asyncGenerators.es2018.2.errors.txt b/tests/baselines/reference/types.asyncGenerators.es2018.2.errors.txt index 2b214fe3d4..1ca77aebc8 100644 --- a/tests/baselines/reference/types.asyncGenerators.es2018.2.errors.txt +++ b/tests/baselines/reference/types.asyncGenerators.es2018.2.errors.txt @@ -72,7 +72,7 @@ tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.es2018.2.ts( yield* Promise.resolve([1, 2]); ~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2504: Type 'Promise' 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 = async function * () { ~~~~~~~~~~~~~~