Skip to content

Commit 0b9fd25

Browse files
committed
Update baseline due to reverting lib
1 parent 42528ab commit 0b9fd25

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

tests/baselines/reference/inferTypes1.errors.txt

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
tests/cases/conformance/types/conditional/inferTypes1.ts(36,23): error TS2344: Type 'string' does not satisfy the constraint '(...args: any) => any'.
22
tests/cases/conformance/types/conditional/inferTypes1.ts(37,23): error TS2344: Type 'Function' does not satisfy the constraint '(...args: any) => any'.
33
Type 'Function' provides no match for the signature '(...args: any): any'.
4-
tests/cases/conformance/types/conditional/inferTypes1.ts(43,25): error TS2344: Type 'string' does not satisfy the constraint 'abstract new (...args: any) => any'.
5-
tests/cases/conformance/types/conditional/inferTypes1.ts(44,25): error TS2344: Type 'Function' does not satisfy the constraint 'abstract new (...args: any) => any'.
4+
tests/cases/conformance/types/conditional/inferTypes1.ts(43,25): error TS2344: Type 'string' does not satisfy the constraint 'new (...args: any) => any'.
5+
tests/cases/conformance/types/conditional/inferTypes1.ts(44,25): error TS2344: Type 'Function' does not satisfy the constraint 'new (...args: any) => any'.
66
Type 'Function' provides no match for the signature 'new (...args: any): any'.
7+
tests/cases/conformance/types/conditional/inferTypes1.ts(45,25): error TS2344: Type 'typeof Abstract' does not satisfy the constraint 'new (...args: any) => any'.
8+
Cannot assign an abstract constructor type to a non-abstract constructor type.
9+
tests/cases/conformance/types/conditional/inferTypes1.ts(47,42): error TS2344: Type 'abstract new (x: string, ...args: T) => T[]' does not satisfy the constraint 'new (...args: any) => any'.
10+
Cannot assign an abstract constructor type to a non-abstract constructor type.
711
tests/cases/conformance/types/conditional/inferTypes1.ts(55,25): error TS2344: Type '(x: string, y: string) => number' does not satisfy the constraint '(x: any) => any'.
812
tests/cases/conformance/types/conditional/inferTypes1.ts(56,25): error TS2344: Type 'Function' does not satisfy the constraint '(x: any) => any'.
913
Type 'Function' provides no match for the signature '(x: any): any'.
@@ -21,7 +25,7 @@ tests/cases/conformance/types/conditional/inferTypes1.ts(153,40): error TS2322:
2125
Type 'T' is not assignable to type 'symbol'.
2226

2327

24-
==== tests/cases/conformance/types/conditional/inferTypes1.ts (16 errors) ====
28+
==== tests/cases/conformance/types/conditional/inferTypes1.ts (18 errors) ====
2529
type Unpacked<T> =
2630
T extends (infer U)[] ? U :
2731
T extends (...args: any[]) => infer U ? U :
@@ -71,14 +75,20 @@ tests/cases/conformance/types/conditional/inferTypes1.ts(153,40): error TS2322:
7175
type U12 = InstanceType<never>; // never
7276
type U13 = InstanceType<string>; // Error
7377
~~~~~~
74-
!!! error TS2344: Type 'string' does not satisfy the constraint 'abstract new (...args: any) => any'.
78+
!!! error TS2344: Type 'string' does not satisfy the constraint 'new (...args: any) => any'.
7579
type U14 = InstanceType<Function>; // Error
7680
~~~~~~~~
77-
!!! error TS2344: Type 'Function' does not satisfy the constraint 'abstract new (...args: any) => any'.
81+
!!! error TS2344: Type 'Function' does not satisfy the constraint 'new (...args: any) => any'.
7882
!!! error TS2344: Type 'Function' provides no match for the signature 'new (...args: any): any'.
7983
type U15 = InstanceType<typeof Abstract>; // Abstract
84+
~~~~~~~~~~~~~~~
85+
!!! error TS2344: Type 'typeof Abstract' does not satisfy the constraint 'new (...args: any) => any'.
86+
!!! error TS2344: Cannot assign an abstract constructor type to a non-abstract constructor type.
8087
type U16<T extends any[]> = InstanceType<new (x: string, ...args: T) => T[]>; // T[]
8188
type U17<T extends any[]> = InstanceType<abstract new (x: string, ...args: T) => T[]>; // T[]
89+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
90+
!!! error TS2344: Type 'abstract new (x: string, ...args: T) => T[]' does not satisfy the constraint 'new (...args: any) => any'.
91+
!!! error TS2344: Cannot assign an abstract constructor type to a non-abstract constructor type.
8292

8393
type ArgumentType<T extends (x: any) => any> = T extends (a: infer A) => any ? A : any;
8494

tests/baselines/reference/inferTypes1.types

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ type U14 = InstanceType<Function>; // Error
117117
>U14 : any
118118

119119
type U15 = InstanceType<typeof Abstract>; // Abstract
120-
>U15 : Abstract
120+
>U15 : any
121121
>Abstract : typeof Abstract
122122

123123
type U16<T extends any[]> = InstanceType<new (x: string, ...args: T) => T[]>; // T[]
@@ -126,7 +126,7 @@ type U16<T extends any[]> = InstanceType<new (x: string, ...args: T) => T[]>; /
126126
>args : T
127127

128128
type U17<T extends any[]> = InstanceType<abstract new (x: string, ...args: T) => T[]>; // T[]
129-
>U17 : T[]
129+
>U17 : any
130130
>x : string
131131
>args : T
132132

0 commit comments

Comments
 (0)