Skip to content

Commit d9e0d6b

Browse files
committed
Accept new baselines
1 parent 059fcc9 commit d9e0d6b

File tree

5 files changed

+24
-24
lines changed

5 files changed

+24
-24
lines changed

tests/baselines/reference/checkJsxChildrenProperty4.errors.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
tests/cases/conformance/jsx/file.tsx(24,28): error TS2551: Property 'NAme' does not exist on type 'IUser'. Did you mean 'Name'?
2-
tests/cases/conformance/jsx/file.tsx(32,10): error TS2322: Type '{ children: ((user: IUser) => Element)[]; }' is not assignable to type 'IFetchUserProps'.
2+
tests/cases/conformance/jsx/file.tsx(32,10): error TS2322: Type '{ children: (((user: IUser) => Element) | ((user: IUser) => Element))[]; }' is not assignable to type 'IFetchUserProps'.
33
Types of property 'children' are incompatible.
4-
Type '((user: IUser) => Element)[]' is not assignable to type '(user: IUser) => Element'.
5-
Type '((user: IUser) => Element)[]' provides no match for the signature '(user: IUser): Element'.
4+
Type '(((user: IUser) => Element) | ((user: IUser) => Element))[]' is not assignable to type '(user: IUser) => Element'.
5+
Type '(((user: IUser) => Element) | ((user: IUser) => Element))[]' provides no match for the signature '(user: IUser): Element'.
66

77

88
==== tests/cases/conformance/jsx/file.tsx (2 errors) ====
@@ -42,10 +42,10 @@ tests/cases/conformance/jsx/file.tsx(32,10): error TS2322: Type '{ children: ((u
4242
return (
4343
<FetchUser>
4444
~~~~~~~~~
45-
!!! error TS2322: Type '{ children: ((user: IUser) => Element)[]; }' is not assignable to type 'IFetchUserProps'.
45+
!!! error TS2322: Type '{ children: (((user: IUser) => Element) | ((user: IUser) => Element))[]; }' is not assignable to type 'IFetchUserProps'.
4646
!!! error TS2322: Types of property 'children' are incompatible.
47-
!!! error TS2322: Type '((user: IUser) => Element)[]' is not assignable to type '(user: IUser) => Element'.
48-
!!! error TS2322: Type '((user: IUser) => Element)[]' provides no match for the signature '(user: IUser): Element'.
47+
!!! error TS2322: Type '(((user: IUser) => Element) | ((user: IUser) => Element))[]' is not assignable to type '(user: IUser) => Element'.
48+
!!! error TS2322: Type '(((user: IUser) => Element) | ((user: IUser) => Element))[]' provides no match for the signature '(user: IUser): Element'.
4949

5050

5151

tests/baselines/reference/overrideBaseIntersectionMethod.types

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ class Foo extends WithLocation(Point) {
7878

7979
return super.getLocation()
8080
>super.getLocation() : [number, number]
81-
>super.getLocation : () => [number, number]
81+
>super.getLocation : (() => [number, number]) & (() => [number, number])
8282
>super : WithLocation<typeof Point>.(Anonymous class) & Point
83-
>getLocation : () => [number, number]
83+
>getLocation : (() => [number, number]) & (() => [number, number])
8484
}
8585
whereAmI() {
8686
>whereAmI : () => [number, number]

tests/baselines/reference/typeParameterExtendingUnion1.types

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ function f<T extends Cat | Dog>(a: T) {
3030

3131
a.run();
3232
>a.run() : void
33-
>a.run : () => void
33+
>a.run : (() => void) | (() => void)
3434
>a : T
35-
>run : () => void
35+
>run : (() => void) | (() => void)
3636

3737
run(a);
3838
>run(a) : void

tests/baselines/reference/typeParameterExtendingUnion2.types

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ function run(a: Cat | Dog) {
1919

2020
a.run();
2121
>a.run() : void
22-
>a.run : () => void
22+
>a.run : (() => void) | (() => void)
2323
>a : Cat | Dog
24-
>run : () => void
24+
>run : (() => void) | (() => void)
2525
}
2626

2727
function f<T extends Cat | Dog>(a: T) {
@@ -30,9 +30,9 @@ function f<T extends Cat | Dog>(a: T) {
3030

3131
a.run();
3232
>a.run() : void
33-
>a.run : () => void
33+
>a.run : (() => void) | (() => void)
3434
>a : T
35-
>run : () => void
35+
>run : (() => void) | (() => void)
3636

3737
run(a);
3838
>run(a) : void

tests/baselines/reference/unionTypeMembers.types

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,9 @@ str = x.commonMethodType(str); // (a: string) => string so result should be stri
9595
>str = x.commonMethodType(str) : string
9696
>str : string
9797
>x.commonMethodType(str) : string
98-
>x.commonMethodType : (a: string) => string
98+
>x.commonMethodType : ((a: string) => string) | ((a: string) => string)
9999
>x : I1<number> | I2<number>
100-
>commonMethodType : (a: string) => string
100+
>commonMethodType : ((a: string) => string) | ((a: string) => string)
101101
>str : string
102102

103103
strOrNum = x.commonPropertyDifferenType;
@@ -133,36 +133,36 @@ num = x.commonMethodWithTypeParameter(num);
133133
>num = x.commonMethodWithTypeParameter(num) : number
134134
>num : number
135135
>x.commonMethodWithTypeParameter(num) : number
136-
>x.commonMethodWithTypeParameter : (a: number) => number
136+
>x.commonMethodWithTypeParameter : ((a: number) => number) | ((a: number) => number)
137137
>x : I1<number> | I2<number>
138-
>commonMethodWithTypeParameter : (a: number) => number
138+
>commonMethodWithTypeParameter : ((a: number) => number) | ((a: number) => number)
139139
>num : number
140140

141141
num = x.commonMethodWithOwnTypeParameter(num);
142142
>num = x.commonMethodWithOwnTypeParameter(num) : number
143143
>num : number
144144
>x.commonMethodWithOwnTypeParameter(num) : number
145-
>x.commonMethodWithOwnTypeParameter : <U>(a: U) => U
145+
>x.commonMethodWithOwnTypeParameter : (<U>(a: U) => U) | (<U>(a: U) => U)
146146
>x : I1<number> | I2<number>
147-
>commonMethodWithOwnTypeParameter : <U>(a: U) => U
147+
>commonMethodWithOwnTypeParameter : (<U>(a: U) => U) | (<U>(a: U) => U)
148148
>num : number
149149

150150
str = x.commonMethodWithOwnTypeParameter(str);
151151
>str = x.commonMethodWithOwnTypeParameter(str) : string
152152
>str : string
153153
>x.commonMethodWithOwnTypeParameter(str) : string
154-
>x.commonMethodWithOwnTypeParameter : <U>(a: U) => U
154+
>x.commonMethodWithOwnTypeParameter : (<U>(a: U) => U) | (<U>(a: U) => U)
155155
>x : I1<number> | I2<number>
156-
>commonMethodWithOwnTypeParameter : <U>(a: U) => U
156+
>commonMethodWithOwnTypeParameter : (<U>(a: U) => U) | (<U>(a: U) => U)
157157
>str : string
158158

159159
strOrNum = x.commonMethodWithOwnTypeParameter(strOrNum);
160160
>strOrNum = x.commonMethodWithOwnTypeParameter(strOrNum) : string | number
161161
>strOrNum : string | number
162162
>x.commonMethodWithOwnTypeParameter(strOrNum) : string | number
163-
>x.commonMethodWithOwnTypeParameter : <U>(a: U) => U
163+
>x.commonMethodWithOwnTypeParameter : (<U>(a: U) => U) | (<U>(a: U) => U)
164164
>x : I1<number> | I2<number>
165-
>commonMethodWithOwnTypeParameter : <U>(a: U) => U
165+
>commonMethodWithOwnTypeParameter : (<U>(a: U) => U) | (<U>(a: U) => U)
166166
>strOrNum : string | number
167167

168168
x.propertyOnlyInI1; // error

0 commit comments

Comments
 (0)