Skip to content

Commit 5c21f43

Browse files
committed
Accept new baselines
1 parent 5310fd0 commit 5c21f43

File tree

63 files changed

+885
-903
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+885
-903
lines changed

tests/baselines/reference/api/tsserverlibrary.d.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2351,7 +2351,9 @@ declare namespace ts {
23512351
*/
23522352
export interface TypeReference extends ObjectType {
23532353
target: GenericType;
2354-
typeArguments?: ReadonlyArray<Type>;
2354+
node?: ArrayTypeNode | TupleTypeNode;
2355+
}
2356+
export interface DeferredTypeReference extends TypeReference {
23552357
}
23562358
export interface GenericType extends InterfaceType, TypeReference {
23572359
}

tests/baselines/reference/api/typescript.d.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2351,7 +2351,9 @@ declare namespace ts {
23512351
*/
23522352
export interface TypeReference extends ObjectType {
23532353
target: GenericType;
2354-
typeArguments?: ReadonlyArray<Type>;
2354+
node?: ArrayTypeNode | TupleTypeNode;
2355+
}
2356+
export interface DeferredTypeReference extends TypeReference {
23552357
}
23562358
export interface GenericType extends InterfaceType, TypeReference {
23572359
}

tests/baselines/reference/arrayFrom.errors.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
tests/cases/compiler/arrayFrom.ts(20,7): error TS2322: Type 'A[]' is not assignable to type 'B[]'.
22
Property 'b' is missing in type 'A' but required in type 'B'.
33
tests/cases/compiler/arrayFrom.ts(23,7): error TS2322: Type 'A[]' is not assignable to type 'B[]'.
4+
Type 'A' is not assignable to type 'B'.
45

56

67
==== tests/cases/compiler/arrayFrom.ts (2 errors) ====
@@ -33,6 +34,7 @@ tests/cases/compiler/arrayFrom.ts(23,7): error TS2322: Type 'A[]' is not assigna
3334
const result6: B[] = Array.from(inputALike); // expect error
3435
~~~~~~~
3536
!!! error TS2322: Type 'A[]' is not assignable to type 'B[]'.
37+
!!! error TS2322: Type 'A' is not assignable to type 'B'.
3638
const result7: B[] = Array.from(inputALike, ({ a }): B => ({ b: a }));
3739
const result8: A[] = Array.from(inputARand);
3840
const result9: B[] = Array.from(inputARand, ({ a }): B => ({ b: a }));

tests/baselines/reference/castingTuple.errors.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ tests/cases/conformance/types/tuple/castingTuple.ts(14,15): error TS2352: Conver
44
Types of property 'length' are incompatible.
55
Type '3' is not comparable to type '2'.
66
tests/cases/conformance/types/tuple/castingTuple.ts(15,14): error TS2352: Conversion of type '[number, string]' to type '[number, string, boolean]' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
7+
Property '2' is missing in type '[number, string]' but required in type '[number, string, boolean]'.
78
tests/cases/conformance/types/tuple/castingTuple.ts(18,21): error TS2352: Conversion of type '[C, D]' to type '[C, D, A]' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
89
Property '2' is missing in type '[C, D]' but required in type '[C, D, A]'.
910
tests/cases/conformance/types/tuple/castingTuple.ts(20,33): error TS2493: Tuple type '[C, D, A]' of length '3' has no element at index '5'.
@@ -40,6 +41,7 @@ tests/cases/conformance/types/tuple/castingTuple.ts(33,1): error TS2304: Cannot
4041
var longer = numStrTuple as [number, string, boolean]
4142
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4243
!!! error TS2352: Conversion of type '[number, string]' to type '[number, string, boolean]' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
44+
!!! error TS2352: Property '2' is missing in type '[number, string]' but required in type '[number, string, boolean]'.
4345
var classCDTuple: [C, D] = [new C(), new D()];
4446
var interfaceIITuple = <[I, I]>classCDTuple;
4547
var classCDATuple = <[C, D, A]>classCDTuple;

tests/baselines/reference/checkJsxChildrenProperty3.types

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ class FetchUser extends React.Component<IFetchUserProps, any> {
3131

3232
? this.props.children(this.state.result)
3333
>this.props.children(this.state.result) : JSX.Element
34-
>this.props.children : ((user: IUser) => JSX.Element) | (((user: IUser) => JSX.Element) & string) | (((user: IUser) => JSX.Element) & number) | (((user: IUser) => JSX.Element) & false) | (((user: IUser) => JSX.Element) & true) | (((user: IUser) => JSX.Element) & React.ReactElement<any>) | (((user: IUser) => JSX.Element) & (string | number | boolean | any[] | React.ReactElement<any>)[])
34+
>this.props.children : ((user: IUser) => JSX.Element) | (((user: IUser) => JSX.Element) & string) | (((user: IUser) => JSX.Element) & number) | (((user: IUser) => JSX.Element) & false) | (((user: IUser) => JSX.Element) & true) | (((user: IUser) => JSX.Element) & React.ReactElement<any>) | (((user: IUser) => JSX.Element) & (string | number | boolean | React.ReactElement<any> | any[])[])
3535
>this.props : IFetchUserProps & { children?: React.ReactNode; }
3636
>this : this
3737
>props : IFetchUserProps & { children?: React.ReactNode; }
38-
>children : ((user: IUser) => JSX.Element) | (((user: IUser) => JSX.Element) & string) | (((user: IUser) => JSX.Element) & number) | (((user: IUser) => JSX.Element) & false) | (((user: IUser) => JSX.Element) & true) | (((user: IUser) => JSX.Element) & React.ReactElement<any>) | (((user: IUser) => JSX.Element) & (string | number | boolean | any[] | React.ReactElement<any>)[])
38+
>children : ((user: IUser) => JSX.Element) | (((user: IUser) => JSX.Element) & string) | (((user: IUser) => JSX.Element) & number) | (((user: IUser) => JSX.Element) & false) | (((user: IUser) => JSX.Element) & true) | (((user: IUser) => JSX.Element) & React.ReactElement<any>) | (((user: IUser) => JSX.Element) & (string | number | boolean | React.ReactElement<any> | any[])[])
3939
>this.state.result : any
4040
>this.state : any
4141
>this : this

tests/baselines/reference/checkJsxChildrenProperty4.errors.txt

Lines changed: 8 additions & 8 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(36,15): error TS2322: Type '(user: IUser) => Element' is not assignable to type 'string | number | boolean | any[] | ReactElement<any>'.
3-
Type '(user: IUser) => Element' is missing the following properties from type 'ReactElement<any>': type, props
4-
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>'.
5-
Type '(user: IUser) => Element' is missing the following properties from type 'ReactElement<any>': type, props
2+
tests/cases/conformance/jsx/file.tsx(36,15): error TS2322: Type '(user: IUser) => Element' is not assignable to type 'string | number | boolean | ReactElement<any> | any[]'.
3+
Type '(user: IUser) => Element' is missing the following properties from type 'any[]': push, pop, concat, join, and 15 more.
4+
tests/cases/conformance/jsx/file.tsx(39,15): error TS2322: Type '(user: IUser) => Element' is not assignable to type 'string | number | boolean | ReactElement<any> | any[]'.
5+
Type '(user: IUser) => Element' is missing the following properties from type 'any[]': push, pop, concat, join, and 15 more.
66

77

88
==== tests/cases/conformance/jsx/file.tsx (3 errors) ====
@@ -50,17 +50,17 @@ tests/cases/conformance/jsx/file.tsx(39,15): error TS2322: Type '(user: IUser) =
5050
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5151
) }
5252
~~~~~~~~~~~~~
53-
!!! error TS2322: Type '(user: IUser) => Element' is not assignable to type 'string | number | boolean | any[] | ReactElement<any>'.
54-
!!! error TS2322: Type '(user: IUser) => Element' is missing the following properties from type 'ReactElement<any>': type, props
53+
!!! error TS2322: Type '(user: IUser) => Element' is not assignable to type 'string | number | boolean | ReactElement<any> | any[]'.
54+
!!! error TS2322: Type '(user: IUser) => Element' is missing the following properties from type 'any[]': push, pop, concat, join, and 15 more.
5555
!!! related TS6212 tests/cases/conformance/jsx/file.tsx:36:15: Did you mean to call this expression?
5656
{ user => (
5757
~~~~~~~~~
5858
<h1>{ user.Name }</h1>
5959
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6060
) }
6161
~~~~~~~~~~~~~
62-
!!! error TS2322: Type '(user: IUser) => Element' is not assignable to type 'string | number | boolean | any[] | ReactElement<any>'.
63-
!!! error TS2322: Type '(user: IUser) => Element' is missing the following properties from type 'ReactElement<any>': type, props
62+
!!! error TS2322: Type '(user: IUser) => Element' is not assignable to type 'string | number | boolean | ReactElement<any> | any[]'.
63+
!!! error TS2322: Type '(user: IUser) => Element' is missing the following properties from type 'any[]': push, pop, concat, join, and 15 more.
6464
!!! related TS6212 tests/cases/conformance/jsx/file.tsx:39:15: Did you mean to call this expression?
6565
</FetchUser>
6666
);

tests/baselines/reference/checkJsxChildrenProperty4.types

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ class FetchUser extends React.Component<IFetchUserProps, any> {
3131

3232
? this.props.children(this.state.result)
3333
>this.props.children(this.state.result) : JSX.Element
34-
>this.props.children : ((user: IUser) => JSX.Element) | (((user: IUser) => JSX.Element) & string) | (((user: IUser) => JSX.Element) & number) | (((user: IUser) => JSX.Element) & false) | (((user: IUser) => JSX.Element) & true) | (((user: IUser) => JSX.Element) & React.ReactElement<any>) | (((user: IUser) => JSX.Element) & (string | number | boolean | any[] | React.ReactElement<any>)[])
34+
>this.props.children : ((user: IUser) => JSX.Element) | (((user: IUser) => JSX.Element) & string) | (((user: IUser) => JSX.Element) & number) | (((user: IUser) => JSX.Element) & false) | (((user: IUser) => JSX.Element) & true) | (((user: IUser) => JSX.Element) & React.ReactElement<any>) | (((user: IUser) => JSX.Element) & (string | number | boolean | React.ReactElement<any> | any[])[])
3535
>this.props : IFetchUserProps & { children?: React.ReactNode; }
3636
>this : this
3737
>props : IFetchUserProps & { children?: React.ReactNode; }
38-
>children : ((user: IUser) => JSX.Element) | (((user: IUser) => JSX.Element) & string) | (((user: IUser) => JSX.Element) & number) | (((user: IUser) => JSX.Element) & false) | (((user: IUser) => JSX.Element) & true) | (((user: IUser) => JSX.Element) & React.ReactElement<any>) | (((user: IUser) => JSX.Element) & (string | number | boolean | any[] | React.ReactElement<any>)[])
38+
>children : ((user: IUser) => JSX.Element) | (((user: IUser) => JSX.Element) & string) | (((user: IUser) => JSX.Element) & number) | (((user: IUser) => JSX.Element) & false) | (((user: IUser) => JSX.Element) & true) | (((user: IUser) => JSX.Element) & React.ReactElement<any>) | (((user: IUser) => JSX.Element) & (string | number | boolean | React.ReactElement<any> | any[])[])
3939
>this.state.result : any
4040
>this.state : any
4141
>this : this

tests/baselines/reference/complexRecursiveCollections.types

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1029,28 +1029,28 @@ declare module Immutable {
10291029
>value : T[K]
10301030

10311031
merge(...collections: Array<Partial<T> | Iterable<[string, any]>>): this;
1032-
>merge : (...collections: (Iterable<[string, any]> | Partial<T>)[]) => this
1033-
>collections : (Iterable<[string, any]> | Partial<T>)[]
1032+
>merge : (...collections: (Partial<T> | Iterable<[string, any]>)[]) => this
1033+
>collections : (Partial<T> | Iterable<[string, any]>)[]
10341034

10351035
mergeDeep(...collections: Array<Partial<T> | Iterable<[string, any]>>): this;
1036-
>mergeDeep : (...collections: (Iterable<[string, any]> | Partial<T>)[]) => this
1037-
>collections : (Iterable<[string, any]> | Partial<T>)[]
1036+
>mergeDeep : (...collections: (Partial<T> | Iterable<[string, any]>)[]) => this
1037+
>collections : (Partial<T> | Iterable<[string, any]>)[]
10381038

10391039
mergeWith(merger: (oldVal: any, newVal: any, key: keyof T) => any, ...collections: Array<Partial<T> | Iterable<[string, any]>>): this;
1040-
>mergeWith : (merger: (oldVal: any, newVal: any, key: keyof T) => any, ...collections: (Iterable<[string, any]> | Partial<T>)[]) => this
1040+
>mergeWith : (merger: (oldVal: any, newVal: any, key: keyof T) => any, ...collections: (Partial<T> | Iterable<[string, any]>)[]) => this
10411041
>merger : (oldVal: any, newVal: any, key: keyof T) => any
10421042
>oldVal : any
10431043
>newVal : any
10441044
>key : keyof T
1045-
>collections : (Iterable<[string, any]> | Partial<T>)[]
1045+
>collections : (Partial<T> | Iterable<[string, any]>)[]
10461046

10471047
mergeDeepWith(merger: (oldVal: any, newVal: any, key: any) => any, ...collections: Array<Partial<T> | Iterable<[string, any]>>): this;
1048-
>mergeDeepWith : (merger: (oldVal: any, newVal: any, key: any) => any, ...collections: (Iterable<[string, any]> | Partial<T>)[]) => this
1048+
>mergeDeepWith : (merger: (oldVal: any, newVal: any, key: any) => any, ...collections: (Partial<T> | Iterable<[string, any]>)[]) => this
10491049
>merger : (oldVal: any, newVal: any, key: any) => any
10501050
>oldVal : any
10511051
>newVal : any
10521052
>key : any
1053-
>collections : (Iterable<[string, any]> | Partial<T>)[]
1053+
>collections : (Partial<T> | Iterable<[string, any]>)[]
10541054

10551055
delete<K extends keyof T>(key: K): this;
10561056
>delete : <K extends keyof T>(key: K) => this

tests/baselines/reference/conditionalTypes1.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ function f21<T extends number | string>(x: T, y: ZeroOf<T>) {
494494
}
495495

496496
type T35<T extends { a: string, b: number }> = T[];
497-
>T35 : T[]
497+
>T35 : T35<T>
498498
>a : string
499499
>b : number
500500

tests/baselines/reference/contextualSignatureInstantiation.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ var d = bar(1, "one", h); // Should be number[] | string[]
108108

109109
var d = bar("one", 1, h); // Should be number[] | string[]
110110
>d : number[] | string[]
111-
>bar("one", 1, h) : number[] | string[]
111+
>bar("one", 1, h) : string[] | number[]
112112
>bar : <T, U, V>(x: T, y: U, cb: (x: T, y: U) => V) => V
113113
>"one" : "one"
114114
>1 : 1

0 commit comments

Comments
 (0)