Skip to content

Commit 75ab347

Browse files
committed
Accept new baselines
1 parent 9ea685b commit 75ab347

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

tests/baselines/reference/conditionalTypeAssignabilityWhenDeferred.errors.txt

+14-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1+
tests/cases/compiler/conditionalTypeAssignabilityWhenDeferred.ts(12,20): error TS2345: Argument of type '"value"' is not assignable to parameter of type 'XX extends XX ? "value" : never'.
12
tests/cases/compiler/conditionalTypeAssignabilityWhenDeferred.ts(28,20): error TS2345: Argument of type 'string' is not assignable to parameter of type 'never'.
23
tests/cases/compiler/conditionalTypeAssignabilityWhenDeferred.ts(29,21): error TS2345: Argument of type 'string' is not assignable to parameter of type 'never'.
4+
tests/cases/compiler/conditionalTypeAssignabilityWhenDeferred.ts(33,22): error TS2345: Argument of type 'T | null' is not assignable to parameter of type 'null extends T | null ? any : never'.
5+
Type 'null' is not assignable to type 'null extends T | null ? any : never'.
6+
tests/cases/compiler/conditionalTypeAssignabilityWhenDeferred.ts(34,23): error TS2345: Argument of type 'T | null' is not assignable to parameter of type '[null] extends [T | null] ? any : never'.
7+
Type 'null' is not assignable to type '[null] extends [T | null] ? any : never'.
38
tests/cases/compiler/conditionalTypeAssignabilityWhenDeferred.ts(39,3): error TS2322: Type '{ x: T; y: T; }' is not assignable to type 'T extends T ? { x: T; y: T; } : never'.
49
tests/cases/compiler/conditionalTypeAssignabilityWhenDeferred.ts(46,3): error TS2322: Type 'string' is not assignable to type 'Foo<T>'.
510
tests/cases/compiler/conditionalTypeAssignabilityWhenDeferred.ts(63,9): error TS2322: Type '{ a: number; b: number; }' is not assignable to type '[T] extends [[infer U]] ? U : { b: number; }'.
@@ -10,7 +15,7 @@ tests/cases/compiler/conditionalTypeAssignabilityWhenDeferred.ts(116,3): error T
1015
Type '(arg: any) => any' is not assignable to type 'InferBecauseWhyNotDistributive<Q>'.
1116

1217

13-
==== tests/cases/compiler/conditionalTypeAssignabilityWhenDeferred.ts (8 errors) ====
18+
==== tests/cases/compiler/conditionalTypeAssignabilityWhenDeferred.ts (11 errors) ====
1419
export type FilterPropsByType<T, TT> = {
1520
[K in keyof T]: T[K] extends TT ? K : never
1621
}[keyof T];
@@ -23,6 +28,8 @@ tests/cases/compiler/conditionalTypeAssignabilityWhenDeferred.ts(116,3): error T
2328

2429
export function func<XX extends string>(x: XX, tipos: { value: XX }[]) {
2530
select(x, tipos, "value");
31+
~~~~~~~
32+
!!! error TS2345: Argument of type '"value"' is not assignable to parameter of type 'XX extends XX ? "value" : never'.
2633
}
2734

2835
declare function onlyNullablePlease<T extends null extends T ? any : never>(
@@ -48,7 +55,13 @@ tests/cases/compiler/conditionalTypeAssignabilityWhenDeferred.ts(116,3): error T
4855
function f<T>(t: T) {
4956
var x: T | null = Math.random() > 0.5 ? null : t;
5057
onlyNullablePlease(x); // should work
58+
~
59+
!!! error TS2345: Argument of type 'T | null' is not assignable to parameter of type 'null extends T | null ? any : never'.
60+
!!! error TS2345: Type 'null' is not assignable to type 'null extends T | null ? any : never'.
5161
onlyNullablePlease2(x); // should work
62+
~
63+
!!! error TS2345: Argument of type 'T | null' is not assignable to parameter of type '[null] extends [T | null] ? any : never'.
64+
!!! error TS2345: Type 'null' is not assignable to type '[null] extends [T | null] ? any : never'.
5265
}
5366

5467
function f2<T>(t1: { x: T; y: T }, t2: T extends T ? { x: T; y: T } : never) {

0 commit comments

Comments
 (0)