Skip to content

Commit 5a4378e

Browse files
Accepted baselines.
1 parent b7da98b commit 5a4378e

8 files changed

+25
-32
lines changed

tests/baselines/reference/checkJsxChildrenProperty2.errors.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@ tests/cases/conformance/jsx/file.tsx(17,11): error TS2710: 'children' are specif
33
tests/cases/conformance/jsx/file.tsx(31,6): error TS2322: Type '{ children: (Element | ((name: string) => Element))[]; a: number; b: string; }' is not assignable to type 'Prop'.
44
Types of property 'children' are incompatible.
55
Type '(Element | ((name: string) => Element))[]' is not assignable to type 'string | Element'.
6-
Type '(Element | ((name: string) => Element))[]' is missing the following properties from type 'Element': type, props
6+
Type '(Element | ((name: string) => Element))[]' is not assignable to type 'string'.
77
tests/cases/conformance/jsx/file.tsx(37,6): error TS2322: Type '{ children: (number | Element)[]; a: number; b: string; }' is not assignable to type 'Prop'.
88
Types of property 'children' are incompatible.
99
Type '(number | Element)[]' is not assignable to type 'string | Element'.
10-
Type '(number | Element)[]' is missing the following properties from type 'Element': type, props
10+
Type '(number | Element)[]' is not assignable to type 'string'.
1111
tests/cases/conformance/jsx/file.tsx(43,6): error TS2322: Type '{ children: (string | Element)[]; a: number; b: string; }' is not assignable to type 'Prop'.
1212
Types of property 'children' are incompatible.
1313
Type '(string | Element)[]' is not assignable to type 'string | Element'.
14-
Type '(string | Element)[]' is missing the following properties from type 'Element': type, props
14+
Type '(string | Element)[]' is not assignable to type 'string'.
1515
tests/cases/conformance/jsx/file.tsx(49,6): error TS2322: Type '{ children: Element[]; a: number; b: string; }' is not assignable to type 'Prop'.
1616
Types of property 'children' are incompatible.
1717
Type 'Element[]' is not assignable to type 'string | Element'.
18-
Type 'Element[]' is missing the following properties from type 'Element': type, props
18+
Type 'Element[]' is not assignable to type 'string'.
1919

2020

2121
==== tests/cases/conformance/jsx/file.tsx (6 errors) ====
@@ -59,7 +59,7 @@ tests/cases/conformance/jsx/file.tsx(49,6): error TS2322: Type '{ children: Elem
5959
!!! error TS2322: Type '{ children: (Element | ((name: string) => Element))[]; a: number; b: string; }' is not assignable to type 'Prop'.
6060
!!! error TS2322: Types of property 'children' are incompatible.
6161
!!! error TS2322: Type '(Element | ((name: string) => Element))[]' is not assignable to type 'string | Element'.
62-
!!! error TS2322: Type '(Element | ((name: string) => Element))[]' is missing the following properties from type 'Element': type, props
62+
!!! error TS2322: Type '(Element | ((name: string) => Element))[]' is not assignable to type 'string'.
6363
<div> My Div </div>
6464
{(name: string) => <div> My name {name} </div>}
6565
</Comp>;
@@ -70,7 +70,7 @@ tests/cases/conformance/jsx/file.tsx(49,6): error TS2322: Type '{ children: Elem
7070
!!! error TS2322: Type '{ children: (number | Element)[]; a: number; b: string; }' is not assignable to type 'Prop'.
7171
!!! error TS2322: Types of property 'children' are incompatible.
7272
!!! error TS2322: Type '(number | Element)[]' is not assignable to type 'string | Element'.
73-
!!! error TS2322: Type '(number | Element)[]' is missing the following properties from type 'Element': type, props
73+
!!! error TS2322: Type '(number | Element)[]' is not assignable to type 'string'.
7474
<div> My Div </div>
7575
{1000000}
7676
</Comp>;
@@ -81,7 +81,7 @@ tests/cases/conformance/jsx/file.tsx(49,6): error TS2322: Type '{ children: Elem
8181
!!! error TS2322: Type '{ children: (string | Element)[]; a: number; b: string; }' is not assignable to type 'Prop'.
8282
!!! error TS2322: Types of property 'children' are incompatible.
8383
!!! error TS2322: Type '(string | Element)[]' is not assignable to type 'string | Element'.
84-
!!! error TS2322: Type '(string | Element)[]' is missing the following properties from type 'Element': type, props
84+
!!! error TS2322: Type '(string | Element)[]' is not assignable to type 'string'.
8585
<div> My Div </div>
8686
hi hi hi!
8787
</Comp>;
@@ -92,7 +92,7 @@ tests/cases/conformance/jsx/file.tsx(49,6): error TS2322: Type '{ children: Elem
9292
!!! error TS2322: Type '{ children: Element[]; a: number; b: string; }' is not assignable to type 'Prop'.
9393
!!! error TS2322: Types of property 'children' are incompatible.
9494
!!! error TS2322: Type 'Element[]' is not assignable to type 'string | Element'.
95-
!!! error TS2322: Type 'Element[]' is missing the following properties from type 'Element': type, props
95+
!!! error TS2322: Type 'Element[]' is not assignable to type 'string'.
9696
<div> My Div </div>
9797
<div> My Div </div>
9898
</Comp>;

tests/baselines/reference/inferTypes1.errors.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ tests/cases/conformance/types/conditional/inferTypes1.ts(75,43): error TS4081: E
1818
tests/cases/conformance/types/conditional/inferTypes1.ts(82,44): error TS2344: Type 'U' does not satisfy the constraint 'string'.
1919
Type 'number' is not assignable to type 'string'.
2020
tests/cases/conformance/types/conditional/inferTypes1.ts(144,40): error TS2322: Type 'T' is not assignable to type 'string | number | symbol'.
21-
Type 'T' is not assignable to type 'symbol'.
21+
Type 'T' is not assignable to type 'string'.
2222

2323

2424
==== tests/cases/conformance/types/conditional/inferTypes1.ts (16 errors) ====
@@ -202,7 +202,7 @@ tests/cases/conformance/types/conditional/inferTypes1.ts(144,40): error TS2322:
202202
type B<T> = string extends T ? { [P in T]: void; } : T; // Error
203203
~
204204
!!! error TS2322: Type 'T' is not assignable to type 'string | number | symbol'.
205-
!!! error TS2322: Type 'T' is not assignable to type 'symbol'.
205+
!!! error TS2322: Type 'T' is not assignable to type 'string'.
206206

207207
// Repro from #22302
208208

tests/baselines/reference/intersectionWithUnionConstraint.errors.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
tests/cases/conformance/types/intersection/intersectionWithUnionConstraint.ts(7,9): error TS2322: Type 'T & U' is not assignable to type 'string | number'.
22
Type 'string | undefined' is not assignable to type 'string | number'.
33
Type 'undefined' is not assignable to type 'string | number'.
4-
Type 'T & U' is not assignable to type 'number'.
4+
Type 'T & U' is not assignable to type 'string'.
55
tests/cases/conformance/types/intersection/intersectionWithUnionConstraint.ts(8,9): error TS2322: Type 'T & U' is not assignable to type 'string | null'.
66
Type 'string | undefined' is not assignable to type 'string | null'.
77
Type 'undefined' is not assignable to type 'string | null'.
@@ -32,7 +32,7 @@ tests/cases/conformance/types/intersection/intersectionWithUnionConstraint.ts(12
3232
!!! error TS2322: Type 'T & U' is not assignable to type 'string | number'.
3333
!!! error TS2322: Type 'string | undefined' is not assignable to type 'string | number'.
3434
!!! error TS2322: Type 'undefined' is not assignable to type 'string | number'.
35-
!!! error TS2322: Type 'T & U' is not assignable to type 'number'.
35+
!!! error TS2322: Type 'T & U' is not assignable to type 'string'.
3636
let y2: string | null = x; // Error
3737
~~
3838
!!! error TS2322: Type 'T & U' is not assignable to type 'string | null'.

tests/baselines/reference/keyofAndIndexedAccess.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ type K00 = keyof any; // string
5858
>K00 : string | number | symbol
5959

6060
type K01 = keyof string; // "toString" | "charAt" | ...
61-
>K01 : number | "length" | "toString" | "concat" | "slice" | "indexOf" | "lastIndexOf" | "charAt" | "charCodeAt" | "localeCompare" | "match" | "replace" | "search" | "split" | "substring" | "toLowerCase" | "toLocaleLowerCase" | "toUpperCase" | "toLocaleUpperCase" | "trim" | "substr" | "valueOf"
61+
>K01 : number | "length" | "toString" | "concat" | "slice" | "indexOf" | "lastIndexOf" | "valueOf" | "charAt" | "charCodeAt" | "localeCompare" | "match" | "replace" | "search" | "split" | "substring" | "toLowerCase" | "toLocaleLowerCase" | "toUpperCase" | "toLocaleUpperCase" | "trim" | "substr"
6262

6363
type K02 = keyof number; // "toString" | "toFixed" | "toExponential" | ...
6464
>K02 : "toString" | "toLocaleString" | "valueOf" | "toFixed" | "toExponential" | "toPrecision"

tests/baselines/reference/keyofAndIndexedAccessErrors.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ type T00 = keyof K0; // Error
2323
>T00 : string | number | symbol
2424

2525
type T01 = keyof Object;
26-
>T01 : "toString" | "constructor" | "toLocaleString" | "valueOf" | "hasOwnProperty" | "isPrototypeOf" | "propertyIsEnumerable"
26+
>T01 : "toString" | "valueOf" | "toLocaleString" | "constructor" | "hasOwnProperty" | "isPrototypeOf" | "propertyIsEnumerable"
2727

2828
type T02 = keyof keyof Object;
2929
>T02 : number | "length" | "toString" | "valueOf" | "charAt" | "charCodeAt" | "concat" | "indexOf" | "lastIndexOf" | "localeCompare" | "match" | "replace" | "search" | "slice" | "split" | "substring" | "toLowerCase" | "toLocaleLowerCase" | "toUpperCase" | "toLocaleUpperCase" | "trim" | "substr"

tests/baselines/reference/mappedTypeErrors.errors.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
tests/cases/conformance/types/mapped/mappedTypeErrors.ts(19,20): error TS2313: Type parameter 'P' has a circular constraint.
22
tests/cases/conformance/types/mapped/mappedTypeErrors.ts(21,20): error TS2322: Type 'Date' is not assignable to type 'string | number | symbol'.
3-
Type 'Date' is not assignable to type 'symbol'.
3+
Type 'Date' is not assignable to type 'number'.
44
tests/cases/conformance/types/mapped/mappedTypeErrors.ts(22,19): error TS2344: Type 'Date' does not satisfy the constraint 'string | number | symbol'.
5-
Type 'Date' is not assignable to type 'symbol'.
5+
Type 'Date' is not assignable to type 'number'.
66
tests/cases/conformance/types/mapped/mappedTypeErrors.ts(25,24): error TS2344: Type '"foo"' does not satisfy the constraint '"name" | "width" | "height" | "visible"'.
77
tests/cases/conformance/types/mapped/mappedTypeErrors.ts(26,24): error TS2344: Type '"name" | "foo"' does not satisfy the constraint '"name" | "width" | "height" | "visible"'.
88
Type '"foo"' is not assignable to type '"name" | "width" | "height" | "visible"'.
@@ -37,7 +37,7 @@ tests/cases/conformance/types/mapped/mappedTypeErrors.ts(128,16): error TS2322:
3737
tests/cases/conformance/types/mapped/mappedTypeErrors.ts(129,25): error TS2322: Type 'string' is not assignable to type 'number | undefined'.
3838
tests/cases/conformance/types/mapped/mappedTypeErrors.ts(130,39): error TS2322: Type 'string' is not assignable to type 'number | undefined'.
3939
tests/cases/conformance/types/mapped/mappedTypeErrors.ts(136,16): error TS2322: Type 'T' is not assignable to type 'string | number | symbol'.
40-
Type 'T' is not assignable to type 'symbol'.
40+
Type 'T' is not assignable to type 'string'.
4141
tests/cases/conformance/types/mapped/mappedTypeErrors.ts(136,21): error TS2536: Type 'P' cannot be used to index type 'T'.
4242
tests/cases/conformance/types/mapped/mappedTypeErrors.ts(148,17): error TS2339: Property 'foo' does not exist on type 'Pick<T, K>'.
4343
tests/cases/conformance/types/mapped/mappedTypeErrors.ts(152,17): error TS2339: Property 'foo' does not exist on type 'Record<K, number>'.
@@ -69,11 +69,11 @@ tests/cases/conformance/types/mapped/mappedTypeErrors.ts(152,17): error TS2339:
6969
type T02 = { [P in Date]: number }; // Error
7070
~~~~
7171
!!! error TS2322: Type 'Date' is not assignable to type 'string | number | symbol'.
72-
!!! error TS2322: Type 'Date' is not assignable to type 'symbol'.
72+
!!! error TS2322: Type 'Date' is not assignable to type 'number'.
7373
type T03 = Record<Date, number>; // Error
7474
~~~~
7575
!!! error TS2344: Type 'Date' does not satisfy the constraint 'string | number | symbol'.
76-
!!! error TS2344: Type 'Date' is not assignable to type 'symbol'.
76+
!!! error TS2344: Type 'Date' is not assignable to type 'number'.
7777

7878
type T10 = Pick<Shape, "name">;
7979
type T11 = Pick<Shape, "foo">; // Error
@@ -249,7 +249,7 @@ tests/cases/conformance/types/mapped/mappedTypeErrors.ts(152,17): error TS2339:
249249
pt: {[P in T]?: T[P]}, // note: should be in keyof T
250250
~
251251
!!! error TS2322: Type 'T' is not assignable to type 'string | number | symbol'.
252-
!!! error TS2322: Type 'T' is not assignable to type 'symbol'.
252+
!!! error TS2322: Type 'T' is not assignable to type 'string'.
253253
~~~~
254254
!!! error TS2536: Type 'P' cannot be used to index type 'T'.
255255
};

tests/baselines/reference/mappedTypeErrors2.errors.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ tests/cases/conformance/types/mapped/mappedTypeErrors2.ts(9,30): error TS2536: T
22
tests/cases/conformance/types/mapped/mappedTypeErrors2.ts(13,30): error TS2536: Type 'K' cannot be used to index type 'T3'.
33
tests/cases/conformance/types/mapped/mappedTypeErrors2.ts(15,38): error TS2536: Type 'S' cannot be used to index type '{ [key in AB[S]]: true; }'.
44
tests/cases/conformance/types/mapped/mappedTypeErrors2.ts(15,47): error TS2322: Type 'AB[S]' is not assignable to type 'string | number | symbol'.
5-
Type 'AB[S]' is not assignable to type 'symbol'.
5+
Type 'AB[S]' is not assignable to type 'string'.
66
tests/cases/conformance/types/mapped/mappedTypeErrors2.ts(15,47): error TS2536: Type 'S' cannot be used to index type 'AB'.
77
tests/cases/conformance/types/mapped/mappedTypeErrors2.ts(17,49): error TS2536: Type 'L' cannot be used to index type '{ [key in AB[S]]: true; }'.
88

@@ -31,7 +31,7 @@ tests/cases/conformance/types/mapped/mappedTypeErrors2.ts(17,49): error TS2536:
3131
!!! error TS2536: Type 'S' cannot be used to index type '{ [key in AB[S]]: true; }'.
3232
~~~~~
3333
!!! error TS2322: Type 'AB[S]' is not assignable to type 'string | number | symbol'.
34-
!!! error TS2322: Type 'AB[S]' is not assignable to type 'symbol'.
34+
!!! error TS2322: Type 'AB[S]' is not assignable to type 'string'.
3535
~~~~~
3636
!!! error TS2536: Type 'S' cannot be used to index type 'AB'.
3737

tests/baselines/reference/unionTypeWithRecursiveSubtypeReduction2.errors.txt

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,7 @@ tests/cases/compiler/unionTypeWithRecursiveSubtypeReduction2.ts(19,1): error TS2
55
tests/cases/compiler/unionTypeWithRecursiveSubtypeReduction2.ts(20,1): error TS2322: Type 'Class' is not assignable to type 'Property'.
66
Types of property 'parent' are incompatible.
77
Type 'Namespace' is not assignable to type 'Module | Class'.
8-
Type 'Namespace' is not assignable to type 'Module'.
9-
Types of property 'members' are incompatible.
10-
Type '(Class | Property)[]' is not assignable to type 'Class[]'.
11-
Type 'Class | Property' is not assignable to type 'Class'.
12-
Type 'Property' is not assignable to type 'Class'.
8+
Property 'parent' is missing in type 'Namespace' but required in type 'Class'.
139

1410

1511
==== tests/cases/compiler/unionTypeWithRecursiveSubtypeReduction2.ts (2 errors) ====
@@ -43,9 +39,6 @@ tests/cases/compiler/unionTypeWithRecursiveSubtypeReduction2.ts(20,1): error TS2
4339
!!! error TS2322: Type 'Class' is not assignable to type 'Property'.
4440
!!! error TS2322: Types of property 'parent' are incompatible.
4541
!!! error TS2322: Type 'Namespace' is not assignable to type 'Module | Class'.
46-
!!! error TS2322: Type 'Namespace' is not assignable to type 'Module'.
47-
!!! error TS2322: Types of property 'members' are incompatible.
48-
!!! error TS2322: Type '(Class | Property)[]' is not assignable to type 'Class[]'.
49-
!!! error TS2322: Type 'Class | Property' is not assignable to type 'Class'.
50-
!!! error TS2322: Type 'Property' is not assignable to type 'Class'.
42+
!!! error TS2322: Property 'parent' is missing in type 'Namespace' but required in type 'Class'.
43+
!!! related TS2728 tests/cases/compiler/unionTypeWithRecursiveSubtypeReduction2.ts:10:12: 'parent' is declared here.
5144

0 commit comments

Comments
 (0)