Skip to content

Commit fb6ae38

Browse files
authored
Merge pull request microsoft#31354 from microsoft/deferConditionalTypes
Defer resolution of true and false branches in conditional types
2 parents 70950cb + 066e4b6 commit fb6ae38

11 files changed

+226
-208
lines changed

src/compiler/checker.ts

Lines changed: 63 additions & 71 deletions
Large diffs are not rendered by default.

src/compiler/types.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3966,6 +3966,8 @@ namespace ts {
39663966
StructuredOrInstantiable = StructuredType | Instantiable,
39673967
/* @internal */
39683968
ObjectFlagsType = Nullable | Never | Object | Union | Intersection,
3969+
/* @internal */
3970+
Simplifiable = IndexedAccess | Conditional | Substitution,
39693971
// 'Narrowable' types are types where narrowing actually narrows.
39703972
// This *should* be every type other than null, undefined, void, and never
39713973
Narrowable = Any | Unknown | StructuredOrInstantiable | StringLike | NumberLike | BigIntLike | BooleanLike | ESSymbol | UniqueESSymbol | NonPrimitive,
@@ -4338,8 +4340,8 @@ namespace ts {
43384340
root: ConditionalRoot;
43394341
checkType: Type;
43404342
extendsType: Type;
4341-
trueType: Type;
4342-
falseType: Type;
4343+
resolvedTrueType: Type;
4344+
resolvedFalseType: Type;
43434345
/* @internal */
43444346
resolvedInferredTrueType?: Type; // The `trueType` instantiated with the `combinedMapper`, if present
43454347
/* @internal */

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2390,8 +2390,8 @@ declare namespace ts {
23902390
root: ConditionalRoot;
23912391
checkType: Type;
23922392
extendsType: Type;
2393-
trueType: Type;
2394-
falseType: Type;
2393+
resolvedTrueType: Type;
2394+
resolvedFalseType: Type;
23952395
}
23962396
interface SubstitutionType extends InstantiableType {
23972397
typeVariable: TypeVariable;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2390,8 +2390,8 @@ declare namespace ts {
23902390
root: ConditionalRoot;
23912391
checkType: Type;
23922392
extendsType: Type;
2393-
trueType: Type;
2394-
falseType: Type;
2393+
resolvedTrueType: Type;
2394+
resolvedFalseType: Type;
23952395
}
23962396
interface SubstitutionType extends InstantiableType {
23972397
typeVariable: TypeVariable;

tests/baselines/reference/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.errors.txt

Lines changed: 44 additions & 32 deletions
Large diffs are not rendered by default.

tests/baselines/reference/conditionalTypes1.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,7 @@ declare type T82 = Eq2<false, true>;
645645
declare type T83 = Eq2<false, false>;
646646
declare type Foo<T> = T extends string ? boolean : number;
647647
declare type Bar<T> = T extends string ? boolean : number;
648-
declare const convert: <U>(value: Foo<U>) => Foo<U>;
648+
declare const convert: <U>(value: Foo<U>) => Bar<U>;
649649
declare type Baz<T> = Foo<T>;
650650
declare const convert2: <T>(value: Foo<T>) => Foo<T>;
651651
declare function f31<T>(): void;

tests/baselines/reference/conditionalTypes1.types

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -779,8 +779,8 @@ type Bar<T> = T extends string ? boolean : number;
779779
>Bar : Bar<T>
780780

781781
const convert = <U>(value: Foo<U>): Bar<U> => value;
782-
>convert : <U>(value: Foo<U>) => Foo<U>
783-
><U>(value: Foo<U>): Bar<U> => value : <U>(value: Foo<U>) => Foo<U>
782+
>convert : <U>(value: Foo<U>) => Bar<U>
783+
><U>(value: Foo<U>): Bar<U> => value : <U>(value: Foo<U>) => Bar<U>
784784
>value : Foo<U>
785785
>value : Foo<U>
786786

@@ -832,7 +832,7 @@ function f33<T, U>() {
832832
>T1 : Foo<T & U>
833833

834834
type T2 = Bar<T & U>;
835-
>T2 : Foo<T & U>
835+
>T2 : Bar<T & U>
836836

837837
var z: T1;
838838
>z : Foo<T & U>

tests/baselines/reference/conditionalTypes2.errors.txt

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ tests/cases/conformance/types/conditional/conditionalTypes2.ts(24,5): error TS23
1010
Type 'keyof B' is not assignable to type 'keyof A'.
1111
Type 'string | number | symbol' is not assignable to type 'keyof A'.
1212
Type 'string' is not assignable to type 'keyof A'.
13-
Type 'string' is not assignable to type 'number | "toString" | "charAt" | "charCodeAt" | "concat" | "indexOf" | "lastIndexOf" | "localeCompare" | "match" | "replace" | "search" | "slice" | "split" | "substring" | "toLowerCase" | "toLocaleLowerCase" | "toUpperCase" | "toLocaleUpperCase" | "trim" | "length" | "substr" | "valueOf"'.
14-
Type 'keyof B' is not assignable to type 'number | "toString" | "charAt" | "charCodeAt" | "concat" | "indexOf" | "lastIndexOf" | "localeCompare" | "match" | "replace" | "search" | "slice" | "split" | "substring" | "toLowerCase" | "toLocaleLowerCase" | "toUpperCase" | "toLocaleUpperCase" | "trim" | "length" | "substr" | "valueOf"'.
15-
Type 'string | number | symbol' is not assignable to type 'number | "toString" | "charAt" | "charCodeAt" | "concat" | "indexOf" | "lastIndexOf" | "localeCompare" | "match" | "replace" | "search" | "slice" | "split" | "substring" | "toLowerCase" | "toLocaleLowerCase" | "toUpperCase" | "toLocaleUpperCase" | "trim" | "length" | "substr" | "valueOf"'.
16-
Type 'string' is not assignable to type 'number | "toString" | "charAt" | "charCodeAt" | "concat" | "indexOf" | "lastIndexOf" | "localeCompare" | "match" | "replace" | "search" | "slice" | "split" | "substring" | "toLowerCase" | "toLocaleLowerCase" | "toUpperCase" | "toLocaleUpperCase" | "trim" | "length" | "substr" | "valueOf"'.
17-
Type 'keyof B' is not assignable to type '"valueOf"'.
18-
Type 'string | number | symbol' is not assignable to type '"valueOf"'.
19-
Type 'string' is not assignable to type '"valueOf"'.
13+
Type 'string' is not assignable to type 'number | "toString" | "charAt" | "charCodeAt" | "concat" | "indexOf" | "lastIndexOf" | "localeCompare" | "match" | "replace" | "search" | "slice" | "split" | "substring" | "toLowerCase" | "toLocaleLowerCase" | "toUpperCase" | "toLocaleUpperCase" | "trim" | "length" | "substr" | "valueOf" | keyof A'.
14+
Type 'keyof B' is not assignable to type 'number | "toString" | "charAt" | "charCodeAt" | "concat" | "indexOf" | "lastIndexOf" | "localeCompare" | "match" | "replace" | "search" | "slice" | "split" | "substring" | "toLowerCase" | "toLocaleLowerCase" | "toUpperCase" | "toLocaleUpperCase" | "trim" | "length" | "substr" | "valueOf" | keyof A'.
15+
Type 'string | number | symbol' is not assignable to type 'number | "toString" | "charAt" | "charCodeAt" | "concat" | "indexOf" | "lastIndexOf" | "localeCompare" | "match" | "replace" | "search" | "slice" | "split" | "substring" | "toLowerCase" | "toLocaleLowerCase" | "toUpperCase" | "toLocaleUpperCase" | "trim" | "length" | "substr" | "valueOf" | keyof A'.
16+
Type 'string' is not assignable to type 'number | "toString" | "charAt" | "charCodeAt" | "concat" | "indexOf" | "lastIndexOf" | "localeCompare" | "match" | "replace" | "search" | "slice" | "split" | "substring" | "toLowerCase" | "toLocaleLowerCase" | "toUpperCase" | "toLocaleUpperCase" | "trim" | "length" | "substr" | "valueOf" | keyof A'.
17+
Type 'keyof B' is not assignable to type 'keyof A'.
18+
Type 'string | number | symbol' is not assignable to type 'keyof A'.
19+
Type 'string' is not assignable to type 'keyof A'.
2020
tests/cases/conformance/types/conditional/conditionalTypes2.ts(25,5): error TS2322: Type 'Invariant<A>' is not assignable to type 'Invariant<B>'.
2121
Types of property 'foo' are incompatible.
2222
Type 'A extends string ? keyof A : A' is not assignable to type 'B extends string ? keyof B : B'.
@@ -73,13 +73,13 @@ tests/cases/conformance/types/conditional/conditionalTypes2.ts(75,12): error TS2
7373
!!! error TS2322: Type 'keyof B' is not assignable to type 'keyof A'.
7474
!!! error TS2322: Type 'string | number | symbol' is not assignable to type 'keyof A'.
7575
!!! error TS2322: Type 'string' is not assignable to type 'keyof A'.
76-
!!! error TS2322: Type 'string' is not assignable to type 'number | "toString" | "charAt" | "charCodeAt" | "concat" | "indexOf" | "lastIndexOf" | "localeCompare" | "match" | "replace" | "search" | "slice" | "split" | "substring" | "toLowerCase" | "toLocaleLowerCase" | "toUpperCase" | "toLocaleUpperCase" | "trim" | "length" | "substr" | "valueOf"'.
77-
!!! error TS2322: Type 'keyof B' is not assignable to type 'number | "toString" | "charAt" | "charCodeAt" | "concat" | "indexOf" | "lastIndexOf" | "localeCompare" | "match" | "replace" | "search" | "slice" | "split" | "substring" | "toLowerCase" | "toLocaleLowerCase" | "toUpperCase" | "toLocaleUpperCase" | "trim" | "length" | "substr" | "valueOf"'.
78-
!!! error TS2322: Type 'string | number | symbol' is not assignable to type 'number | "toString" | "charAt" | "charCodeAt" | "concat" | "indexOf" | "lastIndexOf" | "localeCompare" | "match" | "replace" | "search" | "slice" | "split" | "substring" | "toLowerCase" | "toLocaleLowerCase" | "toUpperCase" | "toLocaleUpperCase" | "trim" | "length" | "substr" | "valueOf"'.
79-
!!! error TS2322: Type 'string' is not assignable to type 'number | "toString" | "charAt" | "charCodeAt" | "concat" | "indexOf" | "lastIndexOf" | "localeCompare" | "match" | "replace" | "search" | "slice" | "split" | "substring" | "toLowerCase" | "toLocaleLowerCase" | "toUpperCase" | "toLocaleUpperCase" | "trim" | "length" | "substr" | "valueOf"'.
80-
!!! error TS2322: Type 'keyof B' is not assignable to type '"valueOf"'.
81-
!!! error TS2322: Type 'string | number | symbol' is not assignable to type '"valueOf"'.
82-
!!! error TS2322: Type 'string' is not assignable to type '"valueOf"'.
76+
!!! error TS2322: Type 'string' is not assignable to type 'number | "toString" | "charAt" | "charCodeAt" | "concat" | "indexOf" | "lastIndexOf" | "localeCompare" | "match" | "replace" | "search" | "slice" | "split" | "substring" | "toLowerCase" | "toLocaleLowerCase" | "toUpperCase" | "toLocaleUpperCase" | "trim" | "length" | "substr" | "valueOf" | keyof A'.
77+
!!! error TS2322: Type 'keyof B' is not assignable to type 'number | "toString" | "charAt" | "charCodeAt" | "concat" | "indexOf" | "lastIndexOf" | "localeCompare" | "match" | "replace" | "search" | "slice" | "split" | "substring" | "toLowerCase" | "toLocaleLowerCase" | "toUpperCase" | "toLocaleUpperCase" | "trim" | "length" | "substr" | "valueOf" | keyof A'.
78+
!!! error TS2322: Type 'string | number | symbol' is not assignable to type 'number | "toString" | "charAt" | "charCodeAt" | "concat" | "indexOf" | "lastIndexOf" | "localeCompare" | "match" | "replace" | "search" | "slice" | "split" | "substring" | "toLowerCase" | "toLocaleLowerCase" | "toUpperCase" | "toLocaleUpperCase" | "trim" | "length" | "substr" | "valueOf" | keyof A'.
79+
!!! error TS2322: Type 'string' is not assignable to type 'number | "toString" | "charAt" | "charCodeAt" | "concat" | "indexOf" | "lastIndexOf" | "localeCompare" | "match" | "replace" | "search" | "slice" | "split" | "substring" | "toLowerCase" | "toLocaleLowerCase" | "toUpperCase" | "toLocaleUpperCase" | "trim" | "length" | "substr" | "valueOf" | keyof A'.
80+
!!! error TS2322: Type 'keyof B' is not assignable to type 'keyof A'.
81+
!!! error TS2322: Type 'string | number | symbol' is not assignable to type 'keyof A'.
82+
!!! error TS2322: Type 'string' is not assignable to type 'keyof A'.
8383
b = a; // Error
8484
~
8585
!!! error TS2322: Type 'Invariant<A>' is not assignable to type 'Invariant<B>'.

tests/baselines/reference/conditionalTypesSimplifyWhenTrivial.types

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,49 @@
11
=== tests/cases/compiler/conditionalTypesSimplifyWhenTrivial.ts ===
22
const fn1 = <Params>(
3-
>fn1 : <Params>(params: Pick<Params, keyof Params>) => Params
4-
><Params>( params: Pick<Params, Exclude<keyof Params, never>>,): Params => params : <Params>(params: Pick<Params, keyof Params>) => Params
3+
>fn1 : <Params>(params: Pick<Params, Exclude<keyof Params, never>>) => Params
4+
><Params>( params: Pick<Params, Exclude<keyof Params, never>>,): Params => params : <Params>(params: Pick<Params, Exclude<keyof Params, never>>) => Params
55

66
params: Pick<Params, Exclude<keyof Params, never>>,
7-
>params : Pick<Params, keyof Params>
7+
>params : Pick<Params, Exclude<keyof Params, never>>
88

99
): Params => params;
10-
>params : Pick<Params, keyof Params>
10+
>params : Pick<Params, Exclude<keyof Params, never>>
1111

1212
function fn2<T>(x: Exclude<T, never>) {
13-
>fn2 : <T>(x: T) => void
14-
>x : T
13+
>fn2 : <T>(x: Exclude<T, never>) => void
14+
>x : Exclude<T, never>
1515

1616
var y: T = x;
1717
>y : T
18-
>x : T
18+
>x : Exclude<T, never>
1919

2020
x = y;
2121
>x = y : T
22-
>x : T
22+
>x : Exclude<T, never>
2323
>y : T
2424
}
2525

2626
const fn3 = <Params>(
27-
>fn3 : <Params>(params: Pick<Params, keyof Params>) => Params
28-
><Params>( params: Pick<Params, Extract<keyof Params, keyof Params>>,): Params => params : <Params>(params: Pick<Params, keyof Params>) => Params
27+
>fn3 : <Params>(params: Pick<Params, Extract<keyof Params, keyof Params>>) => Params
28+
><Params>( params: Pick<Params, Extract<keyof Params, keyof Params>>,): Params => params : <Params>(params: Pick<Params, Extract<keyof Params, keyof Params>>) => Params
2929

3030
params: Pick<Params, Extract<keyof Params, keyof Params>>,
31-
>params : Pick<Params, keyof Params>
31+
>params : Pick<Params, Extract<keyof Params, keyof Params>>
3232

3333
): Params => params;
34-
>params : Pick<Params, keyof Params>
34+
>params : Pick<Params, Extract<keyof Params, keyof Params>>
3535

3636
function fn4<T>(x: Extract<T, T>) {
37-
>fn4 : <T>(x: T) => void
38-
>x : T
37+
>fn4 : <T>(x: Extract<T, T>) => void
38+
>x : Extract<T, T>
3939

4040
var y: T = x;
4141
>y : T
42-
>x : T
42+
>x : Extract<T, T>
4343

4444
x = y;
4545
>x = y : T
46-
>x : T
46+
>x : Extract<T, T>
4747
>y : T
4848
}
4949

@@ -57,101 +57,101 @@ type ExcludeWithDefault<T, U, D = never> = T extends U ? D : T;
5757
>ExcludeWithDefault : ExcludeWithDefault<T, U, D>
5858

5959
const fn5 = <Params>(
60-
>fn5 : <Params>(params: Pick<Params, keyof Params>) => Params
61-
><Params>( params: Pick<Params, ExcludeWithDefault<keyof Params, never>>,): Params => params : <Params>(params: Pick<Params, keyof Params>) => Params
60+
>fn5 : <Params>(params: Pick<Params, ExcludeWithDefault<keyof Params, never, never>>) => Params
61+
><Params>( params: Pick<Params, ExcludeWithDefault<keyof Params, never>>,): Params => params : <Params>(params: Pick<Params, ExcludeWithDefault<keyof Params, never, never>>) => Params
6262

6363
params: Pick<Params, ExcludeWithDefault<keyof Params, never>>,
64-
>params : Pick<Params, keyof Params>
64+
>params : Pick<Params, ExcludeWithDefault<keyof Params, never, never>>
6565

6666
): Params => params;
67-
>params : Pick<Params, keyof Params>
67+
>params : Pick<Params, ExcludeWithDefault<keyof Params, never, never>>
6868

6969
function fn6<T>(x: ExcludeWithDefault<T, never>) {
70-
>fn6 : <T>(x: T) => void
71-
>x : T
70+
>fn6 : <T>(x: ExcludeWithDefault<T, never, never>) => void
71+
>x : ExcludeWithDefault<T, never, never>
7272

7373
var y: T = x;
7474
>y : T
75-
>x : T
75+
>x : ExcludeWithDefault<T, never, never>
7676

7777
x = y;
7878
>x = y : T
79-
>x : T
79+
>x : ExcludeWithDefault<T, never, never>
8080
>y : T
8181
}
8282

8383
const fn7 = <Params>(
84-
>fn7 : <Params>(params: Pick<Params, keyof Params>) => Params
85-
><Params>( params: Pick<Params, ExtractWithDefault<keyof Params, keyof Params>>,): Params => params : <Params>(params: Pick<Params, keyof Params>) => Params
84+
>fn7 : <Params>(params: Pick<Params, ExtractWithDefault<keyof Params, keyof Params, never>>) => Params
85+
><Params>( params: Pick<Params, ExtractWithDefault<keyof Params, keyof Params>>,): Params => params : <Params>(params: Pick<Params, ExtractWithDefault<keyof Params, keyof Params, never>>) => Params
8686

8787
params: Pick<Params, ExtractWithDefault<keyof Params, keyof Params>>,
88-
>params : Pick<Params, keyof Params>
88+
>params : Pick<Params, ExtractWithDefault<keyof Params, keyof Params, never>>
8989

9090
): Params => params;
91-
>params : Pick<Params, keyof Params>
91+
>params : Pick<Params, ExtractWithDefault<keyof Params, keyof Params, never>>
9292

9393
function fn8<T>(x: ExtractWithDefault<T, T>) {
94-
>fn8 : <T>(x: T) => void
95-
>x : T
94+
>fn8 : <T>(x: ExtractWithDefault<T, T, never>) => void
95+
>x : ExtractWithDefault<T, T, never>
9696

9797
var y: T = x;
9898
>y : T
99-
>x : T
99+
>x : ExtractWithDefault<T, T, never>
100100

101101
x = y;
102102
>x = y : T
103-
>x : T
103+
>x : ExtractWithDefault<T, T, never>
104104
>y : T
105105
}
106106

107107
type TemplatedConditional<TCheck, TExtends, TTrue, TFalse> = TCheck extends TExtends ? TTrue : TFalse;
108108
>TemplatedConditional : TemplatedConditional<TCheck, TExtends, TTrue, TFalse>
109109

110110
const fn9 = <Params>(
111-
>fn9 : <Params>(params: Pick<Params, keyof Params>) => Params
112-
><Params>( params: Pick<Params, TemplatedConditional<keyof Params, never, never, keyof Params>>,): Params => params : <Params>(params: Pick<Params, keyof Params>) => Params
111+
>fn9 : <Params>(params: Pick<Params, TemplatedConditional<keyof Params, never, never, keyof Params>>) => Params
112+
><Params>( params: Pick<Params, TemplatedConditional<keyof Params, never, never, keyof Params>>,): Params => params : <Params>(params: Pick<Params, TemplatedConditional<keyof Params, never, never, keyof Params>>) => Params
113113

114114
params: Pick<Params, TemplatedConditional<keyof Params, never, never, keyof Params>>,
115-
>params : Pick<Params, keyof Params>
115+
>params : Pick<Params, TemplatedConditional<keyof Params, never, never, keyof Params>>
116116

117117
): Params => params;
118-
>params : Pick<Params, keyof Params>
118+
>params : Pick<Params, TemplatedConditional<keyof Params, never, never, keyof Params>>
119119

120120
function fn10<T>(x: TemplatedConditional<T, never, never, T>) {
121-
>fn10 : <T>(x: T) => void
122-
>x : T
121+
>fn10 : <T>(x: TemplatedConditional<T, never, never, T>) => void
122+
>x : TemplatedConditional<T, never, never, T>
123123

124124
var y: T = x;
125125
>y : T
126-
>x : T
126+
>x : TemplatedConditional<T, never, never, T>
127127

128128
x = y;
129129
>x = y : T
130-
>x : T
130+
>x : TemplatedConditional<T, never, never, T>
131131
>y : T
132132
}
133133

134134
const fn11 = <Params>(
135-
>fn11 : <Params>(params: Pick<Params, keyof Params>) => Params
136-
><Params>( params: Pick<Params, TemplatedConditional<keyof Params, keyof Params, keyof Params, never>>,): Params => params : <Params>(params: Pick<Params, keyof Params>) => Params
135+
>fn11 : <Params>(params: Pick<Params, TemplatedConditional<keyof Params, keyof Params, keyof Params, never>>) => Params
136+
><Params>( params: Pick<Params, TemplatedConditional<keyof Params, keyof Params, keyof Params, never>>,): Params => params : <Params>(params: Pick<Params, TemplatedConditional<keyof Params, keyof Params, keyof Params, never>>) => Params
137137

138138
params: Pick<Params, TemplatedConditional<keyof Params, keyof Params, keyof Params, never>>,
139-
>params : Pick<Params, keyof Params>
139+
>params : Pick<Params, TemplatedConditional<keyof Params, keyof Params, keyof Params, never>>
140140

141141
): Params => params;
142-
>params : Pick<Params, keyof Params>
142+
>params : Pick<Params, TemplatedConditional<keyof Params, keyof Params, keyof Params, never>>
143143

144144
function fn12<T>(x: TemplatedConditional<T, T, T, never>) {
145-
>fn12 : <T>(x: T) => void
146-
>x : T
145+
>fn12 : <T>(x: TemplatedConditional<T, T, T, never>) => void
146+
>x : TemplatedConditional<T, T, T, never>
147147

148148
var y: T = x;
149149
>y : T
150-
>x : T
150+
>x : TemplatedConditional<T, T, T, never>
151151

152152
x = y;
153153
>x = y : T
154-
>x : T
154+
>x : TemplatedConditional<T, T, T, never>
155155
>y : T
156156
}
157157

tests/baselines/reference/inlinedAliasAssignableToConstraintSameAsAlias.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class A {
3131
>z : A[]
3232

3333
whereRelated< // Works // Type is same as A1, but is not assignable to type A
34-
>whereRelated : <RF extends RelationFields = RelationFields, N extends "x" | "y" | "z" = "x" | "y" | "z", A1 extends A = RF[N] extends A[] ? RF[N][0] : never, A2 extends A = RF[N] extends A[] ? RF[N][0] : never>() => number
34+
>whereRelated : <RF extends RelationFields = RelationFields, N extends "x" | "y" | "z" = "x" | "y" | "z", A1 extends A = RF[N] extends A[] ? RF[N][0] : never, A2 extends A = ShouldA<RF, N>>() => number
3535

3636
RF extends RelationFields = RelationFields,
3737
N extends Name = Name,

0 commit comments

Comments
 (0)