Accept new baselines

This commit is contained in:
Anders Hejlsberg committed 2020-12-29 08:52:14 -10:00
1 parent cc5d0f2de8
commit b2434fc636
19 files changed
+52 -52

No files matched your search

@@ -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<bigint>'.
The types returned by '[Symbol.iterator]().next(...)' are incompatible between these types.
Type 'IteratorResult<number, any>' is not assignable to type 'IteratorResult<bigint, any>'.
Type 'IteratorYieldResult<number>' is not assignable to type 'IteratorYieldResult<bigint> | IteratorReturnResult<any>'.
Type 'IteratorYieldResult<number>' is not assignable to type 'IteratorResult<bigint, any>'.
Type 'IteratorYieldResult<number>' is not assignable to type 'IteratorYieldResult<bigint>'.
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<bigint>'.
!!! error TS2769: The types returned by '[Symbol.iterator]().next(...)' are incompatible between these types.
!!! error TS2769: Type 'IteratorResult<number, any>' is not assignable to type 'IteratorResult<bigint, any>'.
!!! error TS2769: Type 'IteratorYieldResult<number>' is not assignable to type 'IteratorYieldResult<bigint> | IteratorReturnResult<any>'.
!!! error TS2769: Type 'IteratorYieldResult<number>' is not assignable to type 'IteratorResult<bigint, any>'.
!!! error TS2769: Type 'IteratorYieldResult<number>' is not assignable to type 'IteratorYieldResult<bigint>'.
!!! 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.
@@ -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<any>'.
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<any>': 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<any>'.
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<any>': 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<any>'.
!!! 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<any>': 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<any>'.
!!! 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<any>': type, props
!!! related TS6212 tests/cases/conformance/jsx/file.tsx:39:15: Did you mean to call this expression?
</FetchUser>
@@ -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'.
@@ -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.
@@ -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'.
@@ -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 = {
@@ -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'.
!!! error TS2322: Object literal may only specify known properties, and 'd' does not exist in type 'DoesntWork'.
@@ -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<readonly [string, boolean]>'.
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<readonly [string, boolean], any>'.
Type 'IteratorYieldResult<[string, number] | [string, true]>' is not assignable to type 'IteratorReturnResult<any> | IteratorYieldResult<readonly [string, boolean]>'.
Type 'IteratorYieldResult<[string, number] | [string, true]>' is not assignable to type 'IteratorResult<readonly [string, boolean], any>'.
Type 'IteratorYieldResult<[string, number] | [string, true]>' is not assignable to type 'IteratorYieldResult<readonly [string, boolean]>'.
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<readonly [string, boolean]>'.
!!! 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<readonly [string, boolean], any>'.
!!! error TS2769: Type 'IteratorYieldResult<[string, number] | [string, true]>' is not assignable to type 'IteratorReturnResult<any> | IteratorYieldResult<readonly [string, boolean]>'.
!!! error TS2769: Type 'IteratorYieldResult<[string, number] | [string, true]>' is not assignable to type 'IteratorResult<readonly [string, boolean], any>'.
!!! error TS2769: Type 'IteratorYieldResult<[string, number] | [string, true]>' is not assignable to type 'IteratorYieldResult<readonly [string, boolean]>'.
!!! 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]'.
@@ -2,7 +2,7 @@ tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck25.ts(4,5): error
Call signature return types 'Generator<Bar | Baz, void, undefined>' and 'Iterable<Foo>' are incompatible.
The types returned by '[Symbol.iterator]().next(...)' are incompatible between these types.
Type 'IteratorResult<Bar | Baz, void>' is not assignable to type 'IteratorResult<Foo, any>'.
Type 'IteratorYieldResult<Bar | Baz>' is not assignable to type 'IteratorYieldResult<Foo> | IteratorReturnResult<any>'.
Type 'IteratorYieldResult<Bar | Baz>' is not assignable to type 'IteratorResult<Foo, any>'.
Type 'IteratorYieldResult<Bar | Baz>' is not assignable to type 'IteratorYieldResult<Foo>'.
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<Bar | Baz, void, undefined>' and 'Iterable<Foo>' are incompatible.
!!! error TS2322: The types returned by '[Symbol.iterator]().next(...)' are incompatible between these types.
!!! error TS2322: Type 'IteratorResult<Bar | Baz, void>' is not assignable to type 'IteratorResult<Foo, any>'.
!!! error TS2322: Type 'IteratorYieldResult<Bar | Baz>' is not assignable to type 'IteratorYieldResult<Foo> | IteratorReturnResult<any>'.
!!! error TS2322: Type 'IteratorYieldResult<Bar | Baz>' is not assignable to type 'IteratorResult<Foo, any>'.
!!! error TS2322: Type 'IteratorYieldResult<Bar | Baz>' is not assignable to type 'IteratorYieldResult<Foo>'.
!!! 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'.
@@ -2,7 +2,7 @@ tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck63.ts(24,61): err
Call signature return types 'Generator<number, State, undefined>' and 'IterableIterator<State>' are incompatible.
The types returned by 'next(...)' are incompatible between these types.
Type 'IteratorResult<number, State>' is not assignable to type 'IteratorResult<State, any>'.
Type 'IteratorYieldResult<number>' is not assignable to type 'IteratorReturnResult<any> | IteratorYieldResult<State>'.
Type 'IteratorYieldResult<number>' is not assignable to type 'IteratorResult<State, any>'.
Type 'IteratorYieldResult<number>' is not assignable to type 'IteratorYieldResult<State>'.
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<number, State, undefined>' and 'IterableIterator<State>' are incompatible.
!!! error TS2345: The types returned by 'next(...)' are incompatible between these types.
!!! error TS2345: Type 'IteratorResult<number, State>' is not assignable to type 'IteratorResult<State, any>'.
!!! error TS2345: Type 'IteratorYieldResult<number>' is not assignable to type 'IteratorReturnResult<any> | IteratorYieldResult<State>'.
!!! error TS2345: Type 'IteratorYieldResult<number>' is not assignable to type 'IteratorResult<State, any>'.
!!! error TS2345: Type 'IteratorYieldResult<number>' is not assignable to type 'IteratorYieldResult<State>'.
!!! error TS2345: Type 'number' is not assignable to type 'State'.
yield 1;
@@ -1,7 +1,7 @@
tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck8.ts(2,17): error TS2322: Type 'Generator<string, any, undefined>' is not assignable to type 'BadGenerator'.
The types returned by 'next(...)' are incompatible between these types.
Type 'IteratorResult<string, any>' is not assignable to type 'IteratorResult<number, any>'.
Type 'IteratorYieldResult<string>' is not assignable to type 'IteratorYieldResult<number> | IteratorReturnResult<any>'.
Type 'IteratorYieldResult<string>' is not assignable to type 'IteratorResult<number, any>'.
Type 'IteratorYieldResult<string>' is not assignable to type 'IteratorYieldResult<number>'.
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<string, any, undefined>' is not assignable to type 'BadGenerator'.
!!! error TS2322: The types returned by 'next(...)' are incompatible between these types.
!!! error TS2322: Type 'IteratorResult<string, any>' is not assignable to type 'IteratorResult<number, any>'.
!!! error TS2322: Type 'IteratorYieldResult<string>' is not assignable to type 'IteratorYieldResult<number> | IteratorReturnResult<any>'.
!!! error TS2322: Type 'IteratorYieldResult<string>' is not assignable to type 'IteratorResult<number, any>'.
!!! error TS2322: Type 'IteratorYieldResult<string>' is not assignable to type 'IteratorYieldResult<number>'.
!!! error TS2322: Type 'string' is not assignable to type 'number'.
@@ -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<readonly [string, number]>'.
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<readonly [string, number], any>'.
Type 'IteratorYieldResult<[string, number] | [string, boolean]>' is not assignable to type 'IteratorReturnResult<any> | IteratorYieldResult<readonly [string, number]>'.
Type 'IteratorYieldResult<[string, number] | [string, boolean]>' is not assignable to type 'IteratorResult<readonly [string, number], any>'.
Type 'IteratorYieldResult<[string, number] | [string, boolean]>' is not assignable to type 'IteratorYieldResult<readonly [string, number]>'.
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<readonly [string, number]>'.
!!! 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<readonly [string, number], any>'.
!!! error TS2769: Type 'IteratorYieldResult<[string, number] | [string, boolean]>' is not assignable to type 'IteratorReturnResult<any> | IteratorYieldResult<readonly [string, number]>'.
!!! error TS2769: Type 'IteratorYieldResult<[string, number] | [string, boolean]>' is not assignable to type 'IteratorResult<readonly [string, number], any>'.
!!! error TS2769: Type 'IteratorYieldResult<[string, number] | [string, boolean]>' is not assignable to type 'IteratorYieldResult<readonly [string, number]>'.
!!! 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]'.
@@ -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'.
}]]
];
@@ -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;
}
@@ -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'.
@@ -1,4 +1,4 @@
tests/cases/conformance/jsx/file.tsx(13,10): error TS2322: Type '{ editable: true; }' is not assignable to type '(IntrinsicAttributes & IntrinsicClassAttributes<TextComponent> & { editable: false; } & { children?: ReactNode; }) | (IntrinsicAttributes & IntrinsicClassAttributes<TextComponent> & { 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<TextComponent> & (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 = <TextComponent editable={true} />
~~~~~~~~~~~~~
!!! error TS2322: Type '{ editable: true; }' is not assignable to type '(IntrinsicAttributes & IntrinsicClassAttributes<TextComponent> & { editable: false; } & { children?: ReactNode; }) | (IntrinsicAttributes & IntrinsicClassAttributes<TextComponent> & { editable: true; onEdit: (newText: string) => void; } & { children?: ReactNode; })'.
!!! error TS2322: Type '{ editable: true; }' is not assignable to type 'IntrinsicAttributes & (IntrinsicClassAttributes<TextComponent> & (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.
@@ -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<T extends Keys>(x: KeySet<T>): x is KeySet<T|'d'>;
~~~~~
!!! 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; }
@@ -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<IteratorResult<string, void>>' is not assignable to type 'Promise<IteratorResult<number, any>>'.
Type 'IteratorResult<string, void>' is not assignable to type 'IteratorResult<number, any>'.
Type 'IteratorYieldResult<string>' is not assignable to type 'IteratorYieldResult<number> | IteratorReturnResult<any>'.
Type 'IteratorYieldResult<string>' is not assignable to type 'IteratorResult<number, any>'.
Type 'IteratorYieldResult<string>' is not assignable to type 'IteratorYieldResult<number>'.
Type 'string' is not assignable to type 'number'.
tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.es2018.2.ts(13,7): error TS2322: Type '() => AsyncGenerator<string, void, undefined>' is not assignable to type '() => AsyncIterableIterator<number>'.
@@ -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<IteratorResult<string, void>>' is not assignable to type 'Promise<IteratorResult<number, any>>'.
!!! error TS2322: Type 'IteratorResult<string, void>' is not assignable to type 'IteratorResult<number, any>'.
!!! error TS2322: Type 'IteratorYieldResult<string>' is not assignable to type 'IteratorYieldResult<number> | IteratorReturnResult<any>'.
!!! error TS2322: Type 'IteratorYieldResult<string>' is not assignable to type 'IteratorResult<number, any>'.
!!! error TS2322: Type 'IteratorYieldResult<string>' is not assignable to type 'IteratorYieldResult<number>'.
!!! error TS2322: Type 'string' is not assignable to type 'number'.
yield "a";
@@ -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?');
}