Skip to content

Commit bea20a9

Browse files
committed
Accept new baselines
1 parent ae386a9 commit bea20a9

9 files changed

+46
-46
lines changed

tests/baselines/reference/declarationEmitPromise.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,5 @@ exports.runSampleBreaks = runSampleBreaks;
5959
export declare class bluebird<T> {
6060
static all: Array<bluebird<any>>;
6161
}
62-
export declare function runSampleWorks<A, B, C, D, E>(a: bluebird<A>, b?: bluebird<B>, c?: bluebird<C>, d?: bluebird<D>, e?: bluebird<E>): Promise<(<T>(f: (a: A, b?: B, c?: C, d?: D, e?: E) => T) => T) & {}>;
62+
export declare function runSampleWorks<A, B, C, D, E>(a: bluebird<A>, b?: bluebird<B>, c?: bluebird<C>, d?: bluebird<D>, e?: bluebird<E>): Promise<(<T>(f: (a: A, b?: B, c?: C, d?: D, e?: E) => T) => T)>;
6363
export declare function runSampleBreaks<A, B, C, D, E>(a: bluebird<A>, b?: bluebird<B>, c?: bluebird<C>, d?: bluebird<D>, e?: bluebird<E>): Promise<(<T>(f: (a: A, b?: B, c?: C, d?: D, e?: E) => T) => T)>;

tests/baselines/reference/declarationEmitPromise.types

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export class bluebird<T> {
1010
}
1111

1212
export async function runSampleWorks<A, B, C, D, E>(
13-
>runSampleWorks : <A, B, C, D, E>(a: bluebird<A>, b?: bluebird<B>, c?: bluebird<C>, d?: bluebird<D>, e?: bluebird<E>) => Promise<(<T>(f: (a: A, b?: B, c?: C, d?: D, e?: E) => T) => T) & {}>
13+
>runSampleWorks : <A, B, C, D, E>(a: bluebird<A>, b?: bluebird<B>, c?: bluebird<C>, d?: bluebird<D>, e?: bluebird<E>) => Promise<(<T>(f: (a: A, b?: B, c?: C, d?: D, e?: E) => T) => T)>
1414
>A : A
1515
>B : B
1616
>C : C
@@ -85,13 +85,13 @@ export async function runSampleWorks<A, B, C, D, E>(
8585
>result : any
8686

8787
let rfunc: typeof func & {} = func as any; // <- This is the only difference
88-
>rfunc : (<T>(f: (a: A, b?: B, c?: C, d?: D, e?: E) => T) => T) & {}
88+
>rfunc : <T>(f: (a: A, b?: B, c?: C, d?: D, e?: E) => T) => T
8989
>func : <T>(f: (a: A, b?: B, c?: C, d?: D, e?: E) => T) => T
9090
>func as any : any
9191
>func : <T>(f: (a: A, b?: B, c?: C, d?: D, e?: E) => T) => T
9292

9393
return rfunc
94-
>rfunc : (<T>(f: (a: A, b?: B, c?: C, d?: D, e?: E) => T) => T) & {}
94+
>rfunc : <T>(f: (a: A, b?: B, c?: C, d?: D, e?: E) => T) => T
9595
}
9696

9797
export async function runSampleBreaks<A, B, C, D, E>(

tests/baselines/reference/genericDefaults.types

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,7 +1094,7 @@ declare function f12<T, U = T & B>(a?: T, b?: U): [T, U];
10941094

10951095
// inference
10961096
f12();
1097-
>f12() : [{}, {} & B]
1097+
>f12() : [{}, B]
10981098
>f12 : <T, U = T & B>(a?: T, b?: U) => [T, U]
10991099

11001100
f12(a);
@@ -1856,7 +1856,7 @@ declare function f19<T = U, U = T & B>(a?: T, b?: U): [T, U];
18561856

18571857
// inference
18581858
f19();
1859-
>f19() : [{}, {} & B]
1859+
>f19() : [{}, B]
18601860
>f19 : <T = U, U = T & B>(a?: T, b?: U) => [T, U]
18611861

18621862
f19(a);
@@ -1950,11 +1950,11 @@ declare function f20<T, U = V, V = U & C>(a?: T, b?: U, c?: V): [T, U, V];
19501950

19511951
// inference
19521952
f20();
1953-
>f20() : [{}, {}, {} & C]
1953+
>f20() : [{}, {}, C]
19541954
>f20 : <T, U = V, V = U & C>(a?: T, b?: U, c?: V) => [T, U, V]
19551955

19561956
f20(a);
1957-
>f20(a) : [A, {}, {} & C]
1957+
>f20(a) : [A, {}, C]
19581958
>f20 : <T, U = V, V = U & C>(a?: T, b?: U, c?: V) => [T, U, V]
19591959
>a : A
19601960

@@ -1973,25 +1973,25 @@ f20(a, b, c);
19731973

19741974
// no inference, partially supplied
19751975
f20<A>();
1976-
>f20<A>() : [A, {}, {} & C]
1976+
>f20<A>() : [A, {}, C]
19771977
>f20 : <T, U = V, V = U & C>(a?: T, b?: U, c?: V) => [T, U, V]
19781978
>A : A
19791979

19801980
f20<A>(a);
1981-
>f20<A>(a) : [A, {}, {} & C]
1981+
>f20<A>(a) : [A, {}, C]
19821982
>f20 : <T, U = V, V = U & C>(a?: T, b?: U, c?: V) => [T, U, V]
19831983
>A : A
19841984
>a : A
19851985

19861986
f20<A>(a, b);
1987-
>f20<A>(a, b) : [A, {}, {} & C]
1987+
>f20<A>(a, b) : [A, {}, C]
19881988
>f20 : <T, U = V, V = U & C>(a?: T, b?: U, c?: V) => [T, U, V]
19891989
>A : A
19901990
>a : A
19911991
>b : B
19921992

19931993
f20<A>(a, b, bc);
1994-
>f20<A>(a, b, bc) : [A, {}, {} & C]
1994+
>f20<A>(a, b, bc) : [A, {}, C]
19951995
>f20 : <T, U = V, V = U & C>(a?: T, b?: U, c?: V) => [T, U, V]
19961996
>A : A
19971997
>a : A

tests/baselines/reference/keyofAndIndexedAccess.types

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1866,9 +1866,9 @@ let c1 = new Component1({
18661866

18671867
c1.get("hello");
18681868
>c1.get("hello") : string
1869-
>c1.get : <K extends "hello">(key: K) => ({ hello: string; } & {})[K]
1869+
>c1.get : <K extends "hello">(key: K) => { hello: string; }[K]
18701870
>c1 : Component1<{ hello: string; }, {}>
1871-
>get : <K extends "hello">(key: K) => ({ hello: string; } & {})[K]
1871+
>get : <K extends "hello">(key: K) => { hello: string; }[K]
18721872
>"hello" : "hello"
18731873

18741874
// Repro from #12625

tests/baselines/reference/tsxAttributeResolution15.errors.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
tests/cases/conformance/jsx/file.tsx(11,21): error TS2322: Type '{ prop1: "hello"; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<BigGreeter> & {} & { children?: ReactNode; }'.
2-
Property 'prop1' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<BigGreeter> & {} & { children?: ReactNode; }'.
1+
tests/cases/conformance/jsx/file.tsx(11,21): error TS2322: Type '{ prop1: "hello"; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<BigGreeter> & { children?: ReactNode; }'.
2+
Property 'prop1' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<BigGreeter> & { children?: ReactNode; }'.
33

44

55
==== tests/cases/conformance/jsx/file.tsx (1 errors) ====
@@ -15,8 +15,8 @@ tests/cases/conformance/jsx/file.tsx(11,21): error TS2322: Type '{ prop1: "hello
1515
// Error
1616
let a = <BigGreeter prop1="hello" />
1717
~~~~~~~~~~~~~
18-
!!! error TS2322: Type '{ prop1: "hello"; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<BigGreeter> & {} & { children?: ReactNode; }'.
19-
!!! error TS2322: Property 'prop1' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<BigGreeter> & {} & { children?: ReactNode; }'.
18+
!!! error TS2322: Type '{ prop1: "hello"; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<BigGreeter> & { children?: ReactNode; }'.
19+
!!! error TS2322: Property 'prop1' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<BigGreeter> & { children?: ReactNode; }'.
2020

2121
// OK
2222
let b = <BigGreeter ref={(input) => { this.textInput = input; }} />

tests/baselines/reference/tsxSpreadAttributesResolution5.errors.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ tests/cases/conformance/jsx/file.tsx(20,19): error TS2322: Type '{ x: string; y:
22
Type '{ x: string; y: number; }' is not assignable to type 'PoisonedProp'.
33
Types of property 'y' are incompatible.
44
Type 'number' is not assignable to type '2'.
5-
tests/cases/conformance/jsx/file.tsx(33,20): error TS2322: Type '{ prop1: boolean; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<EmptyProp> & {} & { children?: ReactNode; }'.
6-
Property 'prop1' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<EmptyProp> & {} & { children?: ReactNode; }'.
5+
tests/cases/conformance/jsx/file.tsx(33,20): error TS2322: Type '{ prop1: boolean; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<EmptyProp> & { children?: ReactNode; }'.
6+
Property 'prop1' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<EmptyProp> & { children?: ReactNode; }'.
77

88

99
==== tests/cases/conformance/jsx/file.tsx (2 errors) ====
@@ -46,5 +46,5 @@ tests/cases/conformance/jsx/file.tsx(33,20): error TS2322: Type '{ prop1: boolea
4646
// Error
4747
let e = <EmptyProp {...o} />;
4848
~~~~~~
49-
!!! error TS2322: Type '{ prop1: boolean; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<EmptyProp> & {} & { children?: ReactNode; }'.
50-
!!! error TS2322: Property 'prop1' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<EmptyProp> & {} & { children?: ReactNode; }'.
49+
!!! error TS2322: Type '{ prop1: boolean; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<EmptyProp> & { children?: ReactNode; }'.
50+
!!! error TS2322: Property 'prop1' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<EmptyProp> & { children?: ReactNode; }'.

tests/baselines/reference/tsxStatelessFunctionComponents1.errors.txt

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ tests/cases/conformance/jsx/file.tsx(29,15): error TS2322: Type '{ naaaaaaame: "
99
tests/cases/conformance/jsx/file.tsx(34,23): error TS2322: Type '{}' is not assignable to type 'IntrinsicAttributes & { "prop-name": string; }'.
1010
Type '{}' is not assignable to type '{ "prop-name": string; }'.
1111
Property '"prop-name"' is missing in type '{}'.
12-
tests/cases/conformance/jsx/file.tsx(37,23): error TS2322: Type '{ prop1: true; }' is not assignable to type 'IntrinsicAttributes & {}'.
13-
Property 'prop1' does not exist on type 'IntrinsicAttributes & {}'.
14-
tests/cases/conformance/jsx/file.tsx(38,24): error TS2322: Type '{ ref: (x: any) => any; }' is not assignable to type 'IntrinsicAttributes & {}'.
15-
Property 'ref' does not exist on type 'IntrinsicAttributes & {}'.
12+
tests/cases/conformance/jsx/file.tsx(37,23): error TS2322: Type '{ prop1: true; }' is not assignable to type 'IntrinsicAttributes'.
13+
Property 'prop1' does not exist on type 'IntrinsicAttributes'.
14+
tests/cases/conformance/jsx/file.tsx(38,24): error TS2322: Type '{ ref: (x: any) => any; }' is not assignable to type 'IntrinsicAttributes'.
15+
Property 'ref' does not exist on type 'IntrinsicAttributes'.
1616
tests/cases/conformance/jsx/file.tsx(41,16): error TS1005: ',' expected.
17-
tests/cases/conformance/jsx/file.tsx(45,24): error TS2322: Type '{ prop1: boolean; }' is not assignable to type 'IntrinsicAttributes & {}'.
18-
Property 'prop1' does not exist on type 'IntrinsicAttributes & {}'.
17+
tests/cases/conformance/jsx/file.tsx(45,24): error TS2322: Type '{ prop1: boolean; }' is not assignable to type 'IntrinsicAttributes'.
18+
Property 'prop1' does not exist on type 'IntrinsicAttributes'.
1919

2020

2121
==== tests/cases/conformance/jsx/file.tsx (8 errors) ====
@@ -72,12 +72,12 @@ tests/cases/conformance/jsx/file.tsx(45,24): error TS2322: Type '{ prop1: boolea
7272
// Error
7373
let i = <EmptyPropSFC prop1 />
7474
~~~~~
75-
!!! error TS2322: Type '{ prop1: true; }' is not assignable to type 'IntrinsicAttributes & {}'.
76-
!!! error TS2322: Property 'prop1' does not exist on type 'IntrinsicAttributes & {}'.
75+
!!! error TS2322: Type '{ prop1: true; }' is not assignable to type 'IntrinsicAttributes'.
76+
!!! error TS2322: Property 'prop1' does not exist on type 'IntrinsicAttributes'.
7777
let i1 = <EmptyPropSFC ref={x => x.greeting.substr(10)} />
7878
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
79-
!!! error TS2322: Type '{ ref: (x: any) => any; }' is not assignable to type 'IntrinsicAttributes & {}'.
80-
!!! error TS2322: Property 'ref' does not exist on type 'IntrinsicAttributes & {}'.
79+
!!! error TS2322: Type '{ ref: (x: any) => any; }' is not assignable to type 'IntrinsicAttributes'.
80+
!!! error TS2322: Property 'ref' does not exist on type 'IntrinsicAttributes'.
8181

8282
let o = {
8383
prop1: true;
@@ -88,8 +88,8 @@ tests/cases/conformance/jsx/file.tsx(45,24): error TS2322: Type '{ prop1: boolea
8888
// Error
8989
let i2 = <EmptyPropSFC {...o} />
9090
~~~~~~
91-
!!! error TS2322: Type '{ prop1: boolean; }' is not assignable to type 'IntrinsicAttributes & {}'.
92-
!!! error TS2322: Property 'prop1' does not exist on type 'IntrinsicAttributes & {}'.
91+
!!! error TS2322: Type '{ prop1: boolean; }' is not assignable to type 'IntrinsicAttributes'.
92+
!!! error TS2322: Property 'prop1' does not exist on type 'IntrinsicAttributes'.
9393

9494
let o1: any;
9595
// OK

tests/baselines/reference/tsxUnionElementType4.errors.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ tests/cases/conformance/jsx/file.tsx(32,17): error TS2322: Type '{ x: true; }' i
33
Type '{ x: true; }' is not assignable to type '{ x: string; }'.
44
Types of property 'x' are incompatible.
55
Type 'true' is not assignable to type 'string'.
6-
tests/cases/conformance/jsx/file.tsx(33,21): error TS2322: Type '{ x: 10; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<RC4> & {} & { children?: ReactNode; }'.
7-
Property 'x' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<RC4> & {} & { children?: ReactNode; }'.
8-
tests/cases/conformance/jsx/file.tsx(34,22): error TS2322: Type '{ prop: true; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<RC3> & {} & { children?: ReactNode; }'.
9-
Property 'prop' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<RC3> & {} & { children?: ReactNode; }'.
6+
tests/cases/conformance/jsx/file.tsx(33,21): error TS2322: Type '{ x: 10; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<RC4> & { children?: ReactNode; }'.
7+
Property 'x' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<RC4> & { children?: ReactNode; }'.
8+
tests/cases/conformance/jsx/file.tsx(34,22): error TS2322: Type '{ prop: true; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<RC3> & { children?: ReactNode; }'.
9+
Property 'prop' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<RC3> & { children?: ReactNode; }'.
1010

1111

1212
==== tests/cases/conformance/jsx/file.tsx (3 errors) ====
@@ -50,10 +50,10 @@ tests/cases/conformance/jsx/file.tsx(34,22): error TS2322: Type '{ prop: true; }
5050
!!! error TS2322: Type 'true' is not assignable to type 'string'.
5151
let b = <PartRCComp x={10} />
5252
~~~~~~
53-
!!! error TS2322: Type '{ x: 10; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<RC4> & {} & { children?: ReactNode; }'.
54-
!!! error TS2322: Property 'x' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<RC4> & {} & { children?: ReactNode; }'.
53+
!!! error TS2322: Type '{ x: 10; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<RC4> & { children?: ReactNode; }'.
54+
!!! error TS2322: Property 'x' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<RC4> & { children?: ReactNode; }'.
5555
let c = <EmptyRCComp prop />;
5656
~~~~
57-
!!! error TS2322: Type '{ prop: true; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<RC3> & {} & { children?: ReactNode; }'.
58-
!!! error TS2322: Property 'prop' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<RC3> & {} & { children?: ReactNode; }'.
57+
!!! error TS2322: Type '{ prop: true; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<RC3> & { children?: ReactNode; }'.
58+
!!! error TS2322: Property 'prop' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<RC3> & { children?: ReactNode; }'.
5959

tests/baselines/reference/tsxUnionElementType6.errors.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
tests/cases/conformance/jsx/file.tsx(18,23): error TS2322: Type '{ x: true; }' is not assignable to type 'IntrinsicAttributes & {}'.
2-
Property 'x' does not exist on type 'IntrinsicAttributes & {}'.
1+
tests/cases/conformance/jsx/file.tsx(18,23): error TS2322: Type '{ x: true; }' is not assignable to type 'IntrinsicAttributes'.
2+
Property 'x' does not exist on type 'IntrinsicAttributes'.
33
tests/cases/conformance/jsx/file.tsx(19,27): error TS2322: Type '{ x: "hi"; }' is not assignable to type 'IntrinsicAttributes & { x: boolean; }'.
44
Type '{ x: "hi"; }' is not assignable to type '{ x: boolean; }'.
55
Types of property 'x' are incompatible.
@@ -32,8 +32,8 @@ tests/cases/conformance/jsx/file.tsx(21,27): error TS2322: Type '{}' is not assi
3232
// Error
3333
let a = <EmptySFCComp x />;
3434
~
35-
!!! error TS2322: Type '{ x: true; }' is not assignable to type 'IntrinsicAttributes & {}'.
36-
!!! error TS2322: Property 'x' does not exist on type 'IntrinsicAttributes & {}'.
35+
!!! error TS2322: Type '{ x: true; }' is not assignable to type 'IntrinsicAttributes'.
36+
!!! error TS2322: Property 'x' does not exist on type 'IntrinsicAttributes'.
3737
let b = <SFC2AndEmptyComp x="hi" />;
3838
~~~~~~
3939
!!! error TS2322: Type '{ x: "hi"; }' is not assignable to type 'IntrinsicAttributes & { x: boolean; }'.

0 commit comments

Comments
 (0)