diff --git a/tests/baselines/reference/bigintWithLib.errors.txt b/tests/baselines/reference/bigintWithLib.errors.txt index 33a860b59b4..006847c4824 100644 --- a/tests/baselines/reference/bigintWithLib.errors.txt +++ b/tests/baselines/reference/bigintWithLib.errors.txt @@ -6,7 +6,7 @@ tests/cases/compiler/bigintWithLib.ts(19,33): error TS2769: No overload matches Argument of type 'number[]' is not assignable to parameter of type 'Iterable'. The types returned by '[Symbol.iterator]().next(...)' are incompatible between these types. Type 'IteratorResult' is not assignable to type 'IteratorResult'. - Type 'IteratorYieldResult' is not assignable to type 'IteratorYieldResult | IteratorReturnResult'. + Type 'IteratorYieldResult' is not assignable to type 'IteratorResult'. Type 'IteratorYieldResult' is not assignable to type 'IteratorYieldResult'. Type 'number' is not assignable to type 'bigint'. Overload 3 of 3, '(buffer: ArrayBufferLike, byteOffset?: number, length?: number): BigInt64Array', gave the following error. @@ -56,7 +56,7 @@ tests/cases/compiler/bigintWithLib.ts(46,26): error TS2345: Argument of type 'nu !!! error TS2769: Argument of type 'number[]' is not assignable to parameter of type 'Iterable'. !!! error TS2769: The types returned by '[Symbol.iterator]().next(...)' are incompatible between these types. !!! error TS2769: Type 'IteratorResult' is not assignable to type 'IteratorResult'. -!!! error TS2769: Type 'IteratorYieldResult' is not assignable to type 'IteratorYieldResult | IteratorReturnResult'. +!!! error TS2769: Type 'IteratorYieldResult' is not assignable to type 'IteratorResult'. !!! error TS2769: Type 'IteratorYieldResult' is not assignable to type 'IteratorYieldResult'. !!! error TS2769: Type 'number' is not assignable to type 'bigint'. !!! error TS2769: Overload 3 of 3, '(buffer: ArrayBufferLike, byteOffset?: number, length?: number): BigInt64Array', gave the following error. diff --git a/tests/baselines/reference/checkJsxChildrenProperty4.errors.txt b/tests/baselines/reference/checkJsxChildrenProperty4.errors.txt index 34bd2189964..98afca17324 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty4.errors.txt +++ b/tests/baselines/reference/checkJsxChildrenProperty4.errors.txt @@ -1,7 +1,7 @@ tests/cases/conformance/jsx/file.tsx(24,28): error TS2551: Property 'NAme' does not exist on type 'IUser'. Did you mean 'Name'? -tests/cases/conformance/jsx/file.tsx(36,15): error TS2322: Type '(user: IUser) => Element' is not assignable to type 'string | number | boolean | any[] | ReactElement'. +tests/cases/conformance/jsx/file.tsx(36,15): error TS2322: Type '(user: IUser) => Element' is not assignable to type 'boolean | any[] | ReactChild'. Type '(user: IUser) => Element' is missing the following properties from type 'ReactElement': type, props -tests/cases/conformance/jsx/file.tsx(39,15): error TS2322: Type '(user: IUser) => Element' is not assignable to type 'string | number | boolean | any[] | ReactElement'. +tests/cases/conformance/jsx/file.tsx(39,15): error TS2322: Type '(user: IUser) => Element' is not assignable to type 'boolean | any[] | ReactChild'. Type '(user: IUser) => Element' is missing the following properties from type 'ReactElement': type, props @@ -50,7 +50,7 @@ tests/cases/conformance/jsx/file.tsx(39,15): error TS2322: Type '(user: IUser) = ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ) } ~~~~~~~~~~~~~ -!!! error TS2322: Type '(user: IUser) => Element' is not assignable to type 'string | number | boolean | any[] | ReactElement'. +!!! error TS2322: Type '(user: IUser) => Element' is not assignable to type 'boolean | any[] | ReactChild'. !!! error TS2322: Type '(user: IUser) => Element' is missing the following properties from type 'ReactElement': type, props !!! related TS6212 tests/cases/conformance/jsx/file.tsx:36:15: Did you mean to call this expression? { user => ( @@ -59,7 +59,7 @@ tests/cases/conformance/jsx/file.tsx(39,15): error TS2322: Type '(user: IUser) = ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ) } ~~~~~~~~~~~~~ -!!! error TS2322: Type '(user: IUser) => Element' is not assignable to type 'string | number | boolean | any[] | ReactElement'. +!!! error TS2322: Type '(user: IUser) => Element' is not assignable to type 'boolean | any[] | ReactChild'. !!! error TS2322: Type '(user: IUser) => Element' is missing the following properties from type 'ReactElement': type, props !!! related TS6212 tests/cases/conformance/jsx/file.tsx:39:15: Did you mean to call this expression? diff --git a/tests/baselines/reference/enumLiteralTypes3.errors.txt b/tests/baselines/reference/enumLiteralTypes3.errors.txt index e17f3280150..1ba3e3fd798 100644 --- a/tests/baselines/reference/enumLiteralTypes3.errors.txt +++ b/tests/baselines/reference/enumLiteralTypes3.errors.txt @@ -4,7 +4,7 @@ tests/cases/conformance/types/literal/enumLiteralTypes3.ts(11,5): error TS2322: Type 'Choice.Unknown' is not assignable to type 'Choice.Yes'. tests/cases/conformance/types/literal/enumLiteralTypes3.ts(12,5): error TS2322: Type 'Choice' is not assignable to type 'Choice.Yes'. tests/cases/conformance/types/literal/enumLiteralTypes3.ts(18,5): error TS2322: Type 'UnknownYesNo' is not assignable to type 'YesNo'. - Type 'Choice.Unknown' is not assignable to type 'Choice.Yes | Choice.No'. + Type 'Choice.Unknown' is not assignable to type 'YesNo'. tests/cases/conformance/types/literal/enumLiteralTypes3.ts(19,5): error TS2322: Type 'Choice' is not assignable to type 'YesNo'. tests/cases/conformance/types/literal/enumLiteralTypes3.ts(37,5): error TS2322: Type 'Choice.Unknown' is not assignable to type 'Choice.Yes'. tests/cases/conformance/types/literal/enumLiteralTypes3.ts(39,5): error TS2322: Type 'Choice.No' is not assignable to type 'Choice.Yes'. @@ -46,7 +46,7 @@ tests/cases/conformance/types/literal/enumLiteralTypes3.ts(96,14): error TS2678: b = c; ~ !!! error TS2322: Type 'UnknownYesNo' is not assignable to type 'YesNo'. -!!! error TS2322: Type 'Choice.Unknown' is not assignable to type 'Choice.Yes | Choice.No'. +!!! error TS2322: Type 'Choice.Unknown' is not assignable to type 'YesNo'. b = d; ~ !!! error TS2322: Type 'Choice' is not assignable to type 'YesNo'. diff --git a/tests/baselines/reference/errorMessageOnIntersectionsWithDiscriminants01.errors.txt b/tests/baselines/reference/errorMessageOnIntersectionsWithDiscriminants01.errors.txt index 8510e1f9d18..1acdc1587f4 100644 --- a/tests/baselines/reference/errorMessageOnIntersectionsWithDiscriminants01.errors.txt +++ b/tests/baselines/reference/errorMessageOnIntersectionsWithDiscriminants01.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/errorMessageOnIntersectionsWithDiscriminants01.ts(8,1): error TS2322: Type 'A' is not assignable to type 'B'. - Type '{ test: true; } & { foo: 1; }' is not assignable to type '({ test: true; } & { bar: 1; }) | ({ test: false; } & { bar: 1; })'. + Type '{ test: true; } & { foo: 1; }' is not assignable to type 'B'. Type '{ test: true; } & { foo: 1; }' is not assignable to type '{ test: true; } & { bar: 1; }'. Property 'bar' is missing in type '{ test: true; } & { foo: 1; }' but required in type '{ bar: 1; }'. @@ -15,7 +15,7 @@ tests/cases/compiler/errorMessageOnIntersectionsWithDiscriminants01.ts(8,1): err b = a; ~ !!! error TS2322: Type 'A' is not assignable to type 'B'. -!!! error TS2322: Type '{ test: true; } & { foo: 1; }' is not assignable to type '({ test: true; } & { bar: 1; }) | ({ test: false; } & { bar: 1; })'. +!!! error TS2322: Type '{ test: true; } & { foo: 1; }' is not assignable to type 'B'. !!! error TS2322: Type '{ test: true; } & { foo: 1; }' is not assignable to type '{ test: true; } & { bar: 1; }'. !!! error TS2322: Property 'bar' is missing in type '{ test: true; } & { foo: 1; }' but required in type '{ bar: 1; }'. !!! related TS2728 tests/cases/compiler/errorMessageOnIntersectionsWithDiscriminants01.ts:3:28: 'bar' is declared here. diff --git a/tests/baselines/reference/errorsOnUnionsOfOverlappingObjects01.errors.txt b/tests/baselines/reference/errorsOnUnionsOfOverlappingObjects01.errors.txt index cf54512f973..57d30acaba9 100644 --- a/tests/baselines/reference/errorsOnUnionsOfOverlappingObjects01.errors.txt +++ b/tests/baselines/reference/errorsOnUnionsOfOverlappingObjects01.errors.txt @@ -10,7 +10,7 @@ tests/cases/compiler/errorsOnUnionsOfOverlappingObjects01.ts(42,10): error TS234 tests/cases/compiler/errorsOnUnionsOfOverlappingObjects01.ts(43,10): error TS2345: Argument of type '{ man: string; bear: string; }' is not assignable to parameter of type 'ExoticAnimal'. Property 'pig' is missing in type '{ man: string; bear: string; }' but required in type 'ManBearPig'. tests/cases/compiler/errorsOnUnionsOfOverlappingObjects01.ts(46,26): error TS2345: Argument of type '{ man: string; beer: string; }' is not assignable to parameter of type 'ExoticAnimal'. - Object literal may only specify known properties, and 'beer' does not exist in type 'CatDog | ManBearPig | Platypus'. + Object literal may only specify known properties, and 'beer' does not exist in type 'ExoticAnimal'. tests/cases/compiler/errorsOnUnionsOfOverlappingObjects01.ts(47,10): error TS2345: Argument of type '{ man: string; beer: string; }' is not assignable to parameter of type 'ExoticAnimal'. Type '{ man: string; beer: string; }' is missing the following properties from type 'ManBearPig': bear, pig @@ -82,7 +82,7 @@ tests/cases/compiler/errorsOnUnionsOfOverlappingObjects01.ts(47,10): error TS234 addToZoo({ man: "Manny", beer: "Coffee" }); ~~~~~~~~~~~~~~ !!! error TS2345: Argument of type '{ man: string; beer: string; }' is not assignable to parameter of type 'ExoticAnimal'. -!!! error TS2345: Object literal may only specify known properties, and 'beer' does not exist in type 'CatDog | ManBearPig | Platypus'. +!!! error TS2345: Object literal may only specify known properties, and 'beer' does not exist in type 'ExoticAnimal'. addToZoo(manBeer); ~~~~~~~ !!! error TS2345: Argument of type '{ man: string; beer: string; }' is not assignable to parameter of type 'ExoticAnimal'. diff --git a/tests/baselines/reference/excessPropertyCheckWithUnions.errors.txt b/tests/baselines/reference/excessPropertyCheckWithUnions.errors.txt index 1b0ec63fbd0..8c34a0f5d69 100644 --- a/tests/baselines/reference/excessPropertyCheckWithUnions.errors.txt +++ b/tests/baselines/reference/excessPropertyCheckWithUnions.errors.txt @@ -5,9 +5,9 @@ tests/cases/compiler/excessPropertyCheckWithUnions.ts(11,21): error TS2322: Type tests/cases/compiler/excessPropertyCheckWithUnions.ts(12,1): error TS2322: Type '{ tag: "D"; }' is not assignable to type 'ADT'. Property 'd20' is missing in type '{ tag: "D"; }' but required in type '{ tag: "D"; d20: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20; }'. tests/cases/compiler/excessPropertyCheckWithUnions.ts(33,28): error TS2322: Type '{ tag: "A"; x: string; extra: number; }' is not assignable to type 'Ambiguous'. - Object literal may only specify known properties, and 'extra' does not exist in type '{ tag: "A"; x: string; } | { tag: "A"; y: number; } | { tag: "B"; z: boolean; } | { tag: "C"; }'. + Object literal may only specify known properties, and 'extra' does not exist in type 'Ambiguous'. tests/cases/compiler/excessPropertyCheckWithUnions.ts(34,26): error TS2322: Type '{ tag: "A"; y: number; extra: number; }' is not assignable to type 'Ambiguous'. - Object literal may only specify known properties, and 'extra' does not exist in type '{ tag: "A"; x: string; } | { tag: "A"; y: number; } | { tag: "B"; z: boolean; } | { tag: "C"; }'. + Object literal may only specify known properties, and 'extra' does not exist in type 'Ambiguous'. tests/cases/compiler/excessPropertyCheckWithUnions.ts(39,1): error TS2322: Type '{ tag: "A"; }' is not assignable to type 'Ambiguous'. Type '{ tag: "A"; }' is not assignable to type '{ tag: "C"; }'. Types of property 'tag' are incompatible. @@ -23,7 +23,7 @@ tests/cases/compiler/excessPropertyCheckWithUnions.ts(50,35): error TS2322: Type tests/cases/compiler/excessPropertyCheckWithUnions.ts(66,9): error TS2322: Type '{ kind: "A"; n: { a: string; b: string; }; }' is not assignable to type 'AB'. Types of property 'n' are incompatible. Type '{ a: string; b: string; }' is not assignable to type 'AN'. - Object literal may only specify known properties, and 'b' does not exist in type '{ a: string; } | { c: string; }'. + Object literal may only specify known properties, and 'b' does not exist in type 'AN'. tests/cases/compiler/excessPropertyCheckWithUnions.ts(87,5): error TS2322: Type '{ tag: "button"; type: "submit"; href: string; }' is not assignable to type 'Union'. Object literal may only specify known properties, and 'href' does not exist in type 'Button'. tests/cases/compiler/excessPropertyCheckWithUnions.ts(108,5): error TS2322: Type 'string' is not assignable to type 'IValue'. @@ -77,11 +77,11 @@ tests/cases/compiler/excessPropertyCheckWithUnions.ts(114,63): error TS2322: Typ amb = { tag: "A", x: "hi", extra: 12 } ~~~~~~~~~ !!! error TS2322: Type '{ tag: "A"; x: string; extra: number; }' is not assignable to type 'Ambiguous'. -!!! error TS2322: Object literal may only specify known properties, and 'extra' does not exist in type '{ tag: "A"; x: string; } | { tag: "A"; y: number; } | { tag: "B"; z: boolean; } | { tag: "C"; }'. +!!! error TS2322: Object literal may only specify known properties, and 'extra' does not exist in type 'Ambiguous'. amb = { tag: "A", y: 12, extra: 12 } ~~~~~~~~~ !!! error TS2322: Type '{ tag: "A"; y: number; extra: number; }' is not assignable to type 'Ambiguous'. -!!! error TS2322: Object literal may only specify known properties, and 'extra' does not exist in type '{ tag: "A"; x: string; } | { tag: "A"; y: number; } | { tag: "B"; z: boolean; } | { tag: "C"; }'. +!!! error TS2322: Object literal may only specify known properties, and 'extra' does not exist in type 'Ambiguous'. // assignability errors still work. // But note that the error for `z: true` is the fallback one of reporting on @@ -134,7 +134,7 @@ tests/cases/compiler/excessPropertyCheckWithUnions.ts(114,63): error TS2322: Typ !!! error TS2322: Type '{ kind: "A"; n: { a: string; b: string; }; }' is not assignable to type 'AB'. !!! error TS2322: Types of property 'n' are incompatible. !!! error TS2322: Type '{ a: string; b: string; }' is not assignable to type 'AN'. -!!! error TS2322: Object literal may only specify known properties, and 'b' does not exist in type '{ a: string; } | { c: string; }'. +!!! error TS2322: Object literal may only specify known properties, and 'b' does not exist in type 'AN'. } } const abac: AB = { diff --git a/tests/baselines/reference/excessPropertyErrorForFunctionTypes.errors.txt b/tests/baselines/reference/excessPropertyErrorForFunctionTypes.errors.txt index 030ca516221..961308059ba 100644 --- a/tests/baselines/reference/excessPropertyErrorForFunctionTypes.errors.txt +++ b/tests/baselines/reference/excessPropertyErrorForFunctionTypes.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/excessPropertyErrorForFunctionTypes.ts(4,44): error TS2322: Type '{ a: number; c: number; d: number; }' is not assignable to type 'DoesntWork'. - Object literal may only specify known properties, and 'd' does not exist in type '{ a: number; c: number; } | FunctionType'. + Object literal may only specify known properties, and 'd' does not exist in type 'DoesntWork'. ==== tests/cases/compiler/excessPropertyErrorForFunctionTypes.ts (1 errors) ==== @@ -9,4 +9,4 @@ tests/cases/compiler/excessPropertyErrorForFunctionTypes.ts(4,44): error TS2322: let doesntWork: DoesntWork = { a: 1, c: 2, d: 3 } ~~~~ !!! error TS2322: Type '{ a: number; c: number; d: number; }' is not assignable to type 'DoesntWork'. -!!! error TS2322: Object literal may only specify known properties, and 'd' does not exist in type '{ a: number; c: number; } | FunctionType'. \ No newline at end of file +!!! error TS2322: Object literal may only specify known properties, and 'd' does not exist in type 'DoesntWork'. \ No newline at end of file diff --git a/tests/baselines/reference/for-of39.errors.txt b/tests/baselines/reference/for-of39.errors.txt index 31e1fba627d..3ecdc46bcfc 100644 --- a/tests/baselines/reference/for-of39.errors.txt +++ b/tests/baselines/reference/for-of39.errors.txt @@ -3,7 +3,7 @@ tests/cases/conformance/es6/for-ofStatements/for-of39.ts(1,11): error TS2769: No Argument of type '([string, number] | [string, true])[]' is not assignable to parameter of type 'Iterable'. The types returned by '[Symbol.iterator]().next(...)' are incompatible between these types. Type 'IteratorResult<[string, number] | [string, true], any>' is not assignable to type 'IteratorResult'. - Type 'IteratorYieldResult<[string, number] | [string, true]>' is not assignable to type 'IteratorReturnResult | IteratorYieldResult'. + Type 'IteratorYieldResult<[string, number] | [string, true]>' is not assignable to type 'IteratorResult'. Type 'IteratorYieldResult<[string, number] | [string, true]>' is not assignable to type 'IteratorYieldResult'. Type '[string, number] | [string, true]' is not assignable to type 'readonly [string, boolean]'. Type '[string, number]' is not assignable to type 'readonly [string, boolean]'. @@ -21,7 +21,7 @@ tests/cases/conformance/es6/for-ofStatements/for-of39.ts(1,11): error TS2769: No !!! error TS2769: Argument of type '([string, number] | [string, true])[]' is not assignable to parameter of type 'Iterable'. !!! error TS2769: The types returned by '[Symbol.iterator]().next(...)' are incompatible between these types. !!! error TS2769: Type 'IteratorResult<[string, number] | [string, true], any>' is not assignable to type 'IteratorResult'. -!!! error TS2769: Type 'IteratorYieldResult<[string, number] | [string, true]>' is not assignable to type 'IteratorReturnResult | IteratorYieldResult'. +!!! error TS2769: Type 'IteratorYieldResult<[string, number] | [string, true]>' is not assignable to type 'IteratorResult'. !!! error TS2769: Type 'IteratorYieldResult<[string, number] | [string, true]>' is not assignable to type 'IteratorYieldResult'. !!! error TS2769: Type '[string, number] | [string, true]' is not assignable to type 'readonly [string, boolean]'. !!! error TS2769: Type '[string, number]' is not assignable to type 'readonly [string, boolean]'. diff --git a/tests/baselines/reference/generatorTypeCheck25.errors.txt b/tests/baselines/reference/generatorTypeCheck25.errors.txt index 7d5361d128e..e37f1304963 100644 --- a/tests/baselines/reference/generatorTypeCheck25.errors.txt +++ b/tests/baselines/reference/generatorTypeCheck25.errors.txt @@ -2,7 +2,7 @@ tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck25.ts(4,5): error Call signature return types 'Generator' and 'Iterable' are incompatible. The types returned by '[Symbol.iterator]().next(...)' are incompatible between these types. Type 'IteratorResult' is not assignable to type 'IteratorResult'. - Type 'IteratorYieldResult' is not assignable to type 'IteratorYieldResult | IteratorReturnResult'. + Type 'IteratorYieldResult' is not assignable to type 'IteratorResult'. Type 'IteratorYieldResult' is not assignable to type 'IteratorYieldResult'. Type 'Bar | Baz' is not assignable to type 'Foo'. Property 'x' is missing in type 'Baz' but required in type 'Foo'. @@ -18,7 +18,7 @@ tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck25.ts(4,5): error !!! error TS2322: Call signature return types 'Generator' and 'Iterable' are incompatible. !!! error TS2322: The types returned by '[Symbol.iterator]().next(...)' are incompatible between these types. !!! error TS2322: Type 'IteratorResult' is not assignable to type 'IteratorResult'. -!!! error TS2322: Type 'IteratorYieldResult' is not assignable to type 'IteratorYieldResult | IteratorReturnResult'. +!!! error TS2322: Type 'IteratorYieldResult' is not assignable to type 'IteratorResult'. !!! error TS2322: Type 'IteratorYieldResult' is not assignable to type 'IteratorYieldResult'. !!! error TS2322: Type 'Bar | Baz' is not assignable to type 'Foo'. !!! error TS2322: Property 'x' is missing in type 'Baz' but required in type 'Foo'. diff --git a/tests/baselines/reference/generatorTypeCheck63.errors.txt b/tests/baselines/reference/generatorTypeCheck63.errors.txt index 4bee87fdb8c..10cafbe0ced 100644 --- a/tests/baselines/reference/generatorTypeCheck63.errors.txt +++ b/tests/baselines/reference/generatorTypeCheck63.errors.txt @@ -2,7 +2,7 @@ tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck63.ts(24,61): err Call signature return types 'Generator' and 'IterableIterator' are incompatible. The types returned by 'next(...)' are incompatible between these types. Type 'IteratorResult' is not assignable to type 'IteratorResult'. - Type 'IteratorYieldResult' is not assignable to type 'IteratorReturnResult | IteratorYieldResult'. + Type 'IteratorYieldResult' is not assignable to type 'IteratorResult'. Type 'IteratorYieldResult' is not assignable to type 'IteratorYieldResult'. Type 'number' is not assignable to type 'State'. @@ -37,7 +37,7 @@ tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck63.ts(24,61): err !!! error TS2345: Call signature return types 'Generator' and 'IterableIterator' are incompatible. !!! error TS2345: The types returned by 'next(...)' are incompatible between these types. !!! error TS2345: Type 'IteratorResult' is not assignable to type 'IteratorResult'. -!!! error TS2345: Type 'IteratorYieldResult' is not assignable to type 'IteratorReturnResult | IteratorYieldResult'. +!!! error TS2345: Type 'IteratorYieldResult' is not assignable to type 'IteratorResult'. !!! error TS2345: Type 'IteratorYieldResult' is not assignable to type 'IteratorYieldResult'. !!! error TS2345: Type 'number' is not assignable to type 'State'. yield 1; diff --git a/tests/baselines/reference/generatorTypeCheck8.errors.txt b/tests/baselines/reference/generatorTypeCheck8.errors.txt index 7ad215c495b..ca0b1e30366 100644 --- a/tests/baselines/reference/generatorTypeCheck8.errors.txt +++ b/tests/baselines/reference/generatorTypeCheck8.errors.txt @@ -1,7 +1,7 @@ tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck8.ts(2,17): error TS2322: Type 'Generator' is not assignable to type 'BadGenerator'. The types returned by 'next(...)' are incompatible between these types. Type 'IteratorResult' is not assignable to type 'IteratorResult'. - Type 'IteratorYieldResult' is not assignable to type 'IteratorYieldResult | IteratorReturnResult'. + Type 'IteratorYieldResult' is not assignable to type 'IteratorResult'. Type 'IteratorYieldResult' is not assignable to type 'IteratorYieldResult'. Type 'string' is not assignable to type 'number'. @@ -13,6 +13,6 @@ tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck8.ts(2,17): error !!! error TS2322: Type 'Generator' is not assignable to type 'BadGenerator'. !!! error TS2322: The types returned by 'next(...)' are incompatible between these types. !!! error TS2322: Type 'IteratorResult' is not assignable to type 'IteratorResult'. -!!! error TS2322: Type 'IteratorYieldResult' is not assignable to type 'IteratorYieldResult | IteratorReturnResult'. +!!! error TS2322: Type 'IteratorYieldResult' is not assignable to type 'IteratorResult'. !!! error TS2322: Type 'IteratorYieldResult' is not assignable to type 'IteratorYieldResult'. !!! error TS2322: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/iterableArrayPattern28.errors.txt b/tests/baselines/reference/iterableArrayPattern28.errors.txt index ba815996f10..0778b149183 100644 --- a/tests/baselines/reference/iterableArrayPattern28.errors.txt +++ b/tests/baselines/reference/iterableArrayPattern28.errors.txt @@ -3,7 +3,7 @@ tests/cases/conformance/es6/destructuring/iterableArrayPattern28.ts(2,24): error Argument of type '([string, number] | [string, boolean])[]' is not assignable to parameter of type 'Iterable'. The types returned by '[Symbol.iterator]().next(...)' are incompatible between these types. Type 'IteratorResult<[string, number] | [string, boolean], any>' is not assignable to type 'IteratorResult'. - Type 'IteratorYieldResult<[string, number] | [string, boolean]>' is not assignable to type 'IteratorReturnResult | IteratorYieldResult'. + Type 'IteratorYieldResult<[string, number] | [string, boolean]>' is not assignable to type 'IteratorResult'. Type 'IteratorYieldResult<[string, number] | [string, boolean]>' is not assignable to type 'IteratorYieldResult'. Type '[string, number] | [string, boolean]' is not assignable to type 'readonly [string, number]'. Type '[string, boolean]' is not assignable to type 'readonly [string, number]'. @@ -22,7 +22,7 @@ tests/cases/conformance/es6/destructuring/iterableArrayPattern28.ts(2,24): error !!! error TS2769: Argument of type '([string, number] | [string, boolean])[]' is not assignable to parameter of type 'Iterable'. !!! error TS2769: The types returned by '[Symbol.iterator]().next(...)' are incompatible between these types. !!! error TS2769: Type 'IteratorResult<[string, number] | [string, boolean], any>' is not assignable to type 'IteratorResult'. -!!! error TS2769: Type 'IteratorYieldResult<[string, number] | [string, boolean]>' is not assignable to type 'IteratorReturnResult | IteratorYieldResult'. +!!! error TS2769: Type 'IteratorYieldResult<[string, number] | [string, boolean]>' is not assignable to type 'IteratorResult'. !!! error TS2769: Type 'IteratorYieldResult<[string, number] | [string, boolean]>' is not assignable to type 'IteratorYieldResult'. !!! error TS2769: Type '[string, number] | [string, boolean]' is not assignable to type 'readonly [string, number]'. !!! error TS2769: Type '[string, boolean]' is not assignable to type 'readonly [string, number]'. diff --git a/tests/baselines/reference/nestedRecursiveArraysOrObjectsError01.errors.txt b/tests/baselines/reference/nestedRecursiveArraysOrObjectsError01.errors.txt index fd8a2a9c2fa..8db42a231ad 100644 --- a/tests/baselines/reference/nestedRecursiveArraysOrObjectsError01.errors.txt +++ b/tests/baselines/reference/nestedRecursiveArraysOrObjectsError01.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/nestedRecursiveArraysOrObjectsError01.ts(10,9): error TS2322: Type '{ foo: string; jj: number; }' is not assignable to type 'Style'. - Object literal may only specify known properties, and 'jj' does not exist in type 'StyleBase | StyleArray'. + Object literal may only specify known properties, and 'jj' does not exist in type 'Style'. ==== tests/cases/compiler/nestedRecursiveArraysOrObjectsError01.ts (1 errors) ==== @@ -15,7 +15,7 @@ tests/cases/compiler/nestedRecursiveArraysOrObjectsError01.ts(10,9): error TS232 jj: 1 // intentional error ~~~~~ !!! error TS2322: Type '{ foo: string; jj: number; }' is not assignable to type 'Style'. -!!! error TS2322: Object literal may only specify known properties, and 'jj' does not exist in type 'StyleBase | StyleArray'. +!!! error TS2322: Object literal may only specify known properties, and 'jj' does not exist in type 'Style'. }]] ]; diff --git a/tests/baselines/reference/numericLiteralTypes3.errors.txt b/tests/baselines/reference/numericLiteralTypes3.errors.txt index 68a532b2f3d..a9fbb5df915 100644 --- a/tests/baselines/reference/numericLiteralTypes3.errors.txt +++ b/tests/baselines/reference/numericLiteralTypes3.errors.txt @@ -6,15 +6,15 @@ tests/cases/conformance/types/literal/numericLiteralTypes3.ts(10,5): error TS232 Type '0' is not assignable to type '1'. tests/cases/conformance/types/literal/numericLiteralTypes3.ts(14,5): error TS2322: Type '1' is not assignable to type 'B'. tests/cases/conformance/types/literal/numericLiteralTypes3.ts(16,5): error TS2322: Type 'C' is not assignable to type 'B'. - Type '1' is not assignable to type '2 | 3'. + Type '1' is not assignable to type 'B'. tests/cases/conformance/types/literal/numericLiteralTypes3.ts(17,5): error TS2322: Type 'D' is not assignable to type 'B'. - Type '0' is not assignable to type '2 | 3'. + Type '0' is not assignable to type 'B'. tests/cases/conformance/types/literal/numericLiteralTypes3.ts(24,5): error TS2322: Type 'D' is not assignable to type 'C'. - Type '0' is not assignable to type '2 | 3 | 1'. + Type '0' is not assignable to type 'C'. tests/cases/conformance/types/literal/numericLiteralTypes3.ts(29,5): error TS2322: Type 'B' is not assignable to type 'D'. - Type '3' is not assignable to type '0 | 2 | 1'. + Type '3' is not assignable to type 'D'. tests/cases/conformance/types/literal/numericLiteralTypes3.ts(30,5): error TS2322: Type 'C' is not assignable to type 'D'. - Type '3' is not assignable to type '0 | 2 | 1'. + Type '3' is not assignable to type 'D'. tests/cases/conformance/types/literal/numericLiteralTypes3.ts(35,5): error TS2322: Type '0' is not assignable to type '1'. tests/cases/conformance/types/literal/numericLiteralTypes3.ts(37,5): error TS2322: Type '2' is not assignable to type '1'. tests/cases/conformance/types/literal/numericLiteralTypes3.ts(38,5): error TS2322: Type '3' is not assignable to type '1'. @@ -66,11 +66,11 @@ tests/cases/conformance/types/literal/numericLiteralTypes3.ts(98,14): error TS26 b = c; ~ !!! error TS2322: Type 'C' is not assignable to type 'B'. -!!! error TS2322: Type '1' is not assignable to type '2 | 3'. +!!! error TS2322: Type '1' is not assignable to type 'B'. b = d; ~ !!! error TS2322: Type 'D' is not assignable to type 'B'. -!!! error TS2322: Type '0' is not assignable to type '2 | 3'. +!!! error TS2322: Type '0' is not assignable to type 'B'. } function f3(a: A, b: B, c: C, d: D) { @@ -80,7 +80,7 @@ tests/cases/conformance/types/literal/numericLiteralTypes3.ts(98,14): error TS26 c = d; ~ !!! error TS2322: Type 'D' is not assignable to type 'C'. -!!! error TS2322: Type '0' is not assignable to type '2 | 3 | 1'. +!!! error TS2322: Type '0' is not assignable to type 'C'. } function f4(a: A, b: B, c: C, d: D) { @@ -88,11 +88,11 @@ tests/cases/conformance/types/literal/numericLiteralTypes3.ts(98,14): error TS26 d = b; ~ !!! error TS2322: Type 'B' is not assignable to type 'D'. -!!! error TS2322: Type '3' is not assignable to type '0 | 2 | 1'. +!!! error TS2322: Type '3' is not assignable to type 'D'. d = c; ~ !!! error TS2322: Type 'C' is not assignable to type 'D'. -!!! error TS2322: Type '3' is not assignable to type '0 | 2 | 1'. +!!! error TS2322: Type '3' is not assignable to type 'D'. d = d; } diff --git a/tests/baselines/reference/stringEnumLiteralTypes3.errors.txt b/tests/baselines/reference/stringEnumLiteralTypes3.errors.txt index 865b991caa6..bdb775ae5e6 100644 --- a/tests/baselines/reference/stringEnumLiteralTypes3.errors.txt +++ b/tests/baselines/reference/stringEnumLiteralTypes3.errors.txt @@ -4,7 +4,7 @@ tests/cases/conformance/types/literal/stringEnumLiteralTypes3.ts(11,5): error TS Type 'Choice.Unknown' is not assignable to type 'Choice.Yes'. tests/cases/conformance/types/literal/stringEnumLiteralTypes3.ts(12,5): error TS2322: Type 'Choice' is not assignable to type 'Choice.Yes'. tests/cases/conformance/types/literal/stringEnumLiteralTypes3.ts(18,5): error TS2322: Type 'UnknownYesNo' is not assignable to type 'YesNo'. - Type 'Choice.Unknown' is not assignable to type 'Choice.Yes | Choice.No'. + Type 'Choice.Unknown' is not assignable to type 'YesNo'. tests/cases/conformance/types/literal/stringEnumLiteralTypes3.ts(19,5): error TS2322: Type 'Choice' is not assignable to type 'YesNo'. tests/cases/conformance/types/literal/stringEnumLiteralTypes3.ts(37,5): error TS2322: Type 'Choice.Unknown' is not assignable to type 'Choice.Yes'. tests/cases/conformance/types/literal/stringEnumLiteralTypes3.ts(39,5): error TS2322: Type 'Choice.No' is not assignable to type 'Choice.Yes'. @@ -46,7 +46,7 @@ tests/cases/conformance/types/literal/stringEnumLiteralTypes3.ts(96,14): error T b = c; ~ !!! error TS2322: Type 'UnknownYesNo' is not assignable to type 'YesNo'. -!!! error TS2322: Type 'Choice.Unknown' is not assignable to type 'Choice.Yes | Choice.No'. +!!! error TS2322: Type 'Choice.Unknown' is not assignable to type 'YesNo'. b = d; ~ !!! error TS2322: Type 'Choice' is not assignable to type 'YesNo'. diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution6.errors.txt b/tests/baselines/reference/tsxSpreadAttributesResolution6.errors.txt index 0027abe1092..360f8a72ada 100644 --- a/tests/baselines/reference/tsxSpreadAttributesResolution6.errors.txt +++ b/tests/baselines/reference/tsxSpreadAttributesResolution6.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/jsx/file.tsx(13,10): error TS2322: Type '{ editable: true; }' is not assignable to type '(IntrinsicAttributes & IntrinsicClassAttributes & { editable: false; } & { children?: ReactNode; }) | (IntrinsicAttributes & IntrinsicClassAttributes & { editable: true; onEdit: (newText: string) => void; } & { children?: ReactNode; })'. +tests/cases/conformance/jsx/file.tsx(13,10): error TS2322: Type '{ editable: true; }' is not assignable to type 'IntrinsicAttributes & (IntrinsicClassAttributes & (TextProps & { children?: ReactNode; }))'. Property 'onEdit' is missing in type '{ editable: true; }' but required in type '{ editable: true; onEdit: (newText: string) => void; }'. @@ -17,7 +17,7 @@ tests/cases/conformance/jsx/file.tsx(13,10): error TS2322: Type '{ editable: tru // Error let x = ~~~~~~~~~~~~~ -!!! error TS2322: Type '{ editable: true; }' is not assignable to type '(IntrinsicAttributes & IntrinsicClassAttributes & { editable: false; } & { children?: ReactNode; }) | (IntrinsicAttributes & IntrinsicClassAttributes & { editable: true; onEdit: (newText: string) => void; } & { children?: ReactNode; })'. +!!! error TS2322: Type '{ editable: true; }' is not assignable to type 'IntrinsicAttributes & (IntrinsicClassAttributes & (TextProps & { children?: ReactNode; }))'. !!! error TS2322: Property 'onEdit' is missing in type '{ editable: true; }' but required in type '{ editable: true; onEdit: (newText: string) => void; }'. !!! related TS2728 tests/cases/conformance/jsx/file.tsx:4:36: 'onEdit' is declared here. diff --git a/tests/baselines/reference/typeGuardFunctionErrors.errors.txt b/tests/baselines/reference/typeGuardFunctionErrors.errors.txt index 80c87849ff4..443c556fe55 100644 --- a/tests/baselines/reference/typeGuardFunctionErrors.errors.txt +++ b/tests/baselines/reference/typeGuardFunctionErrors.errors.txt @@ -55,7 +55,7 @@ tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(128,34 tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(132,34): error TS1230: A type predicate cannot reference element 'p1' in a binding pattern. tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(136,39): error TS1230: A type predicate cannot reference element 'p1' in a binding pattern. tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(152,68): error TS2344: Type 'T | "d"' does not satisfy the constraint 'Keys'. - Type '"d"' is not assignable to type '"a" | "b" | "c"'. + Type '"d"' is not assignable to type 'Keys'. tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(159,31): error TS2344: Type 'Bar' does not satisfy the constraint 'Foo'. Types of property ''a'' are incompatible. Type 'number' is not assignable to type 'string'. @@ -332,7 +332,7 @@ tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(166,54 declare function hasKey(x: KeySet): x is KeySet; ~~~~~ !!! error TS2344: Type 'T | "d"' does not satisfy the constraint 'Keys'. -!!! error TS2344: Type '"d"' is not assignable to type '"a" | "b" | "c"'. +!!! error TS2344: Type '"d"' is not assignable to type 'Keys'. type Foo = { 'a': string; } type Bar = { 'a': number; } diff --git a/tests/baselines/reference/types.asyncGenerators.es2018.2.errors.txt b/tests/baselines/reference/types.asyncGenerators.es2018.2.errors.txt index db200ed1f0e..6f3a7581e64 100644 --- a/tests/baselines/reference/types.asyncGenerators.es2018.2.errors.txt +++ b/tests/baselines/reference/types.asyncGenerators.es2018.2.errors.txt @@ -5,7 +5,7 @@ tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.es2018.2.ts( The types returned by 'next(...)' are incompatible between these types. Type 'Promise>' is not assignable to type 'Promise>'. Type 'IteratorResult' is not assignable to type 'IteratorResult'. - Type 'IteratorYieldResult' is not assignable to type 'IteratorYieldResult | IteratorReturnResult'. + Type 'IteratorYieldResult' is not assignable to type 'IteratorResult'. Type 'IteratorYieldResult' is not assignable to type 'IteratorYieldResult'. Type 'string' is not assignable to type 'number'. tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.es2018.2.ts(13,7): error TS2322: Type '() => AsyncGenerator' is not assignable to type '() => AsyncIterableIterator'. @@ -70,7 +70,7 @@ tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.es2018.2.ts( !!! error TS2322: The types returned by 'next(...)' are incompatible between these types. !!! error TS2322: Type 'Promise>' is not assignable to type 'Promise>'. !!! error TS2322: Type 'IteratorResult' is not assignable to type 'IteratorResult'. -!!! error TS2322: Type 'IteratorYieldResult' is not assignable to type 'IteratorYieldResult | IteratorReturnResult'. +!!! error TS2322: Type 'IteratorYieldResult' is not assignable to type 'IteratorResult'. !!! error TS2322: Type 'IteratorYieldResult' is not assignable to type 'IteratorYieldResult'. !!! error TS2322: Type 'string' is not assignable to type 'number'. yield "a"; diff --git a/tests/baselines/reference/unknownType2.errors.txt b/tests/baselines/reference/unknownType2.errors.txt index 26939706863..1469526182b 100644 --- a/tests/baselines/reference/unknownType2.errors.txt +++ b/tests/baselines/reference/unknownType2.errors.txt @@ -1,5 +1,5 @@ tests/cases/conformance/types/unknown/unknownType2.ts(216,13): error TS2322: Type '"yes" | "no" | "maybe"' is not assignable to type 'SomeResponse'. - Type '"maybe"' is not assignable to type '"yes" | "no" | "idk"'. + Type '"maybe"' is not assignable to type 'SomeResponse'. ==== tests/cases/conformance/types/unknown/unknownType2.ts (1 errors) ==== @@ -221,7 +221,7 @@ tests/cases/conformance/types/unknown/unknownType2.ts(216,13): error TS2322: Typ return x; // error ~~~~~~~~~ !!! error TS2322: Type '"yes" | "no" | "maybe"' is not assignable to type 'SomeResponse'. -!!! error TS2322: Type '"maybe"' is not assignable to type '"yes" | "no" | "idk"'. +!!! error TS2322: Type '"maybe"' is not assignable to type 'SomeResponse'. default: throw new Error('Can you repeat the question?'); }