Skip to content

Commit 3e160e1

Browse files
committed
Baseline accept
1 parent 3f5c1d2 commit 3e160e1

36 files changed

+455
-280
lines changed

tests/baselines/reference/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ export type Matching<InjectedProps, DecorationTargetProps> = {
105105
};
106106

107107
export type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
108-
>Omit : Omit<T, K>
108+
>Omit : Pick<T, Exclude<keyof T, K>>
109109

110110
export type InferableComponentEnhancerWithProps<TInjectedProps, TNeedsProps> =
111111
>InferableComponentEnhancerWithProps : InferableComponentEnhancerWithProps<TInjectedProps, TNeedsProps>

tests/baselines/reference/circularlySimplifyingConditionalTypesNoCrash.types

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
=== tests/cases/compiler/circularlySimplifyingConditionalTypesNoCrash.ts ===
22
type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
3-
>Omit : Omit<T, K>
3+
>Omit : Pick<T, Exclude<keyof T, K>>
44

55
type Shared< // Circularly self constraining type, defered thanks to mapping
66
>Shared : Shared<InjectedProps, DecorationTargetProps>
@@ -54,7 +54,7 @@ declare var connect: Connect;
5454

5555
const myStoreConnect: Connect = function(
5656
>myStoreConnect : Connect
57-
>function( mapStateToProps?: any, mapDispatchToProps?: any, mergeProps?: any, options: unknown = {},) { return connect( mapStateToProps, mapDispatchToProps, mergeProps, options, );} : <TStateProps, TOwnProps>(mapStateToProps?: any, mapDispatchToProps?: any, mergeProps?: any, options?: unknown) => InferableComponentEnhancerWithProps<TStateProps, Omit<P, Extract<keyof TStateProps, keyof P>> & TOwnProps>
57+
>function( mapStateToProps?: any, mapDispatchToProps?: any, mergeProps?: any, options: unknown = {},) { return connect( mapStateToProps, mapDispatchToProps, mergeProps, options, );} : <TStateProps, TOwnProps>(mapStateToProps?: any, mapDispatchToProps?: any, mergeProps?: any, options?: unknown) => InferableComponentEnhancerWithProps<unknown, Pick<P, Exclude<keyof P, Extract<keyof TStateProps, keyof P>>> & TOwnProps>
5858

5959
mapStateToProps?: any,
6060
>mapStateToProps : any
@@ -71,7 +71,7 @@ const myStoreConnect: Connect = function(
7171

7272
) {
7373
return connect(
74-
>connect( mapStateToProps, mapDispatchToProps, mergeProps, options, ) : InferableComponentEnhancerWithProps<TStateProps, Omit<P, Extract<keyof TStateProps, keyof P>> & TOwnProps>
74+
>connect( mapStateToProps, mapDispatchToProps, mergeProps, options, ) : InferableComponentEnhancerWithProps<unknown, Pick<P, Exclude<keyof P, Extract<keyof TStateProps, keyof P>>> & TOwnProps>
7575
>connect : Connect
7676

7777
mapStateToProps,

tests/baselines/reference/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.errors.txt

Lines changed: 4 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,6 @@
11
tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts(33,5): error TS2322: Type '{ type: T; localChannelId: string; }' is not assignable to type 'NewChannel<ChannelOfType<T, TextChannel> | ChannelOfType<T, EmailChannel>>'.
2-
Type '{ type: T; localChannelId: string; }' is not assignable to type 'Pick<ChannelOfType<T, TextChannel> | ChannelOfType<T, EmailChannel>, "type">'.
3-
Types of property 'type' are incompatible.
4-
Type 'T' is not assignable to type 'ChannelOfType<T, TextChannel>["type"] & ChannelOfType<T, EmailChannel>["type"]'.
5-
Type '"text" | "email"' is not assignable to type 'ChannelOfType<T, TextChannel>["type"] & ChannelOfType<T, EmailChannel>["type"]'.
6-
Type '"text"' is not assignable to type 'ChannelOfType<T, TextChannel>["type"] & ChannelOfType<T, EmailChannel>["type"]'.
7-
Type '"text"' is not assignable to type 'ChannelOfType<T, TextChannel>["type"]'.
8-
Type 'T' is not assignable to type 'ChannelOfType<T, TextChannel>["type"]'.
9-
Type '"text" | "email"' is not assignable to type 'ChannelOfType<T, TextChannel>["type"]'.
10-
Type '"text"' is not assignable to type 'ChannelOfType<T, TextChannel>["type"]'.
11-
Type '"text"' is not assignable to type 'T & "text"'.
12-
Type 'T' is not assignable to type 'T & "text"'.
13-
Type '"text" | "email"' is not assignable to type 'T & "text"'.
14-
Type '"text"' is not assignable to type 'T & "text"'.
15-
Type '"text"' is not assignable to type 'T'.
16-
'"text"' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '"text" | "email"'.
17-
Type 'T' is not assignable to type '"text"'.
18-
Type '"text" | "email"' is not assignable to type '"text"'.
19-
Type '"email"' is not assignable to type '"text"'.
2+
Type '{ type: T; localChannelId: string; }' is not assignable to type 'Pick<ChannelOfType<T, EmailChannel>, "type"> & Partial<Pick<ChannelOfType<T, EmailChannel>, (({ [P in keyof ChannelOfType<T, TextChannel>]: P; } | { [P in keyof ChannelOfType<T, EmailChannel>]: P; }) & { type: never; id: never; } & { [x: string]: never; })[keyof ChannelOfType<T, TextChannel> & keyof ChannelOfType<T, EmailChannel>]>> & { localChannelId: string; }'.
3+
Type '{ type: T; localChannelId: string; }' is not assignable to type 'Pick<ChannelOfType<T, EmailChannel>, "type">'.
204

215

226
==== tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts (1 errors) ====
@@ -55,24 +39,8 @@ tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.t
5539
return { type, localChannelId };
5640
~~~~~~
5741
!!! error TS2322: Type '{ type: T; localChannelId: string; }' is not assignable to type 'NewChannel<ChannelOfType<T, TextChannel> | ChannelOfType<T, EmailChannel>>'.
58-
!!! error TS2322: Type '{ type: T; localChannelId: string; }' is not assignable to type 'Pick<ChannelOfType<T, TextChannel> | ChannelOfType<T, EmailChannel>, "type">'.
59-
!!! error TS2322: Types of property 'type' are incompatible.
60-
!!! error TS2322: Type 'T' is not assignable to type 'ChannelOfType<T, TextChannel>["type"] & ChannelOfType<T, EmailChannel>["type"]'.
61-
!!! error TS2322: Type '"text" | "email"' is not assignable to type 'ChannelOfType<T, TextChannel>["type"] & ChannelOfType<T, EmailChannel>["type"]'.
62-
!!! error TS2322: Type '"text"' is not assignable to type 'ChannelOfType<T, TextChannel>["type"] & ChannelOfType<T, EmailChannel>["type"]'.
63-
!!! error TS2322: Type '"text"' is not assignable to type 'ChannelOfType<T, TextChannel>["type"]'.
64-
!!! error TS2322: Type 'T' is not assignable to type 'ChannelOfType<T, TextChannel>["type"]'.
65-
!!! error TS2322: Type '"text" | "email"' is not assignable to type 'ChannelOfType<T, TextChannel>["type"]'.
66-
!!! error TS2322: Type '"text"' is not assignable to type 'ChannelOfType<T, TextChannel>["type"]'.
67-
!!! error TS2322: Type '"text"' is not assignable to type 'T & "text"'.
68-
!!! error TS2322: Type 'T' is not assignable to type 'T & "text"'.
69-
!!! error TS2322: Type '"text" | "email"' is not assignable to type 'T & "text"'.
70-
!!! error TS2322: Type '"text"' is not assignable to type 'T & "text"'.
71-
!!! error TS2322: Type '"text"' is not assignable to type 'T'.
72-
!!! error TS2322: '"text"' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '"text" | "email"'.
73-
!!! error TS2322: Type 'T' is not assignable to type '"text"'.
74-
!!! error TS2322: Type '"text" | "email"' is not assignable to type '"text"'.
75-
!!! error TS2322: Type '"email"' is not assignable to type '"text"'.
42+
!!! error TS2322: Type '{ type: T; localChannelId: string; }' is not assignable to type 'Pick<ChannelOfType<T, EmailChannel>, "type"> & Partial<Pick<ChannelOfType<T, EmailChannel>, (({ [P in keyof ChannelOfType<T, TextChannel>]: P; } | { [P in keyof ChannelOfType<T, EmailChannel>]: P; }) & { type: never; id: never; } & { [x: string]: never; })[keyof ChannelOfType<T, TextChannel> & keyof ChannelOfType<T, EmailChannel>]>> & { localChannelId: string; }'.
43+
!!! error TS2322: Type '{ type: T; localChannelId: string; }' is not assignable to type 'Pick<ChannelOfType<T, EmailChannel>, "type">'.
7644
}
7745

7846
const newTextChannel = makeNewChannel('text');

tests/baselines/reference/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.symbols

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,9 @@ const newTextChannel = makeNewChannel('text');
112112

113113
// This should work
114114
newTextChannel.phoneNumber = '613-555-1234';
115-
>newTextChannel.phoneNumber : Symbol(phoneNumber, Decl(complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts, 2, 17))
115+
>newTextChannel.phoneNumber : Symbol(phoneNumber)
116116
>newTextChannel : Symbol(newTextChannel, Decl(complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts, 35, 5))
117-
>phoneNumber : Symbol(phoneNumber, Decl(complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts, 2, 17))
117+
>phoneNumber : Symbol(phoneNumber)
118118

119119
const newTextChannel2 : NewChannel<TextChannel> = makeNewChannel('text');
120120
>newTextChannel2 : Symbol(newTextChannel2, Decl(complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts, 39, 5))
@@ -124,7 +124,7 @@ const newTextChannel2 : NewChannel<TextChannel> = makeNewChannel('text');
124124

125125
// Compare with this, which ofc works.
126126
newTextChannel2.phoneNumber = '613-555-1234';
127-
>newTextChannel2.phoneNumber : Symbol(phoneNumber, Decl(complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts, 2, 17))
127+
>newTextChannel2.phoneNumber : Symbol(phoneNumber)
128128
>newTextChannel2 : Symbol(newTextChannel2, Decl(complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts, 39, 5))
129-
>phoneNumber : Symbol(phoneNumber, Decl(complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts, 2, 17))
129+
>phoneNumber : Symbol(phoneNumber)
130130

tests/baselines/reference/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export type ChannelType = Channel extends { type: infer R } ? R : never;
2929
>type : R
3030

3131
type Omit<T, K extends keyof T> = Pick<
32-
>Omit : Omit<T, K>
32+
>Omit : Pick<T, ({ [P in keyof T]: P; } & { [P in K]: never; } & { [x: string]: never; })[keyof T]>
3333

3434
T,
3535
({ [P in keyof T]: P } & { [P in K]: never } & { [x: string]: never })[keyof T]

tests/baselines/reference/conditionalTypes1.errors.txt

Lines changed: 12 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,12 @@ tests/cases/conformance/types/conditional/conditionalTypes1.ts(29,5): error TS23
1919
Type 'T["x"]' is not assignable to type '{}'.
2020
Type 'string | undefined' is not assignable to type '{}'.
2121
Type 'undefined' is not assignable to type '{}'.
22-
tests/cases/conformance/types/conditional/conditionalTypes1.ts(103,5): error TS2322: Type 'FunctionProperties<T>' is not assignable to type 'T'.
23-
'T' could be instantiated with an arbitrary type which could be unrelated to 'FunctionProperties<T>'.
24-
tests/cases/conformance/types/conditional/conditionalTypes1.ts(104,5): error TS2322: Type 'NonFunctionProperties<T>' is not assignable to type 'T'.
25-
'T' could be instantiated with an arbitrary type which could be unrelated to 'NonFunctionProperties<T>'.
26-
tests/cases/conformance/types/conditional/conditionalTypes1.ts(106,5): error TS2322: Type 'NonFunctionProperties<T>' is not assignable to type 'FunctionProperties<T>'.
27-
Type 'FunctionPropertyNames<T>' is not assignable to type 'NonFunctionPropertyNames<T>'.
28-
Type 'keyof T' is not assignable to type 'T[keyof T] extends Function ? never : keyof T'.
29-
Type 'string | number | symbol' is not assignable to type 'T[keyof T] extends Function ? never : keyof T'.
30-
Type 'string' is not assignable to type 'T[keyof T] extends Function ? never : keyof T'.
31-
Type 'keyof T' is not assignable to type 'never'.
32-
Type 'string | number | symbol' is not assignable to type 'never'.
33-
Type 'string' is not assignable to type 'never'.
34-
tests/cases/conformance/types/conditional/conditionalTypes1.ts(108,5): error TS2322: Type 'FunctionProperties<T>' is not assignable to type 'NonFunctionProperties<T>'.
35-
Type 'NonFunctionPropertyNames<T>' is not assignable to type 'FunctionPropertyNames<T>'.
36-
Type 'keyof T' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'.
37-
Type 'string | number | symbol' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'.
38-
Type 'string' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'.
39-
Type 'keyof T' is not assignable to type 'never'.
22+
tests/cases/conformance/types/conditional/conditionalTypes1.ts(103,5): error TS2322: Type 'Pick<T, FunctionPropertyNames<T>>' is not assignable to type 'T'.
23+
'T' could be instantiated with an arbitrary type which could be unrelated to 'Pick<T, FunctionPropertyNames<T>>'.
24+
tests/cases/conformance/types/conditional/conditionalTypes1.ts(104,5): error TS2322: Type 'Pick<T, NonFunctionPropertyNames<T>>' is not assignable to type 'T'.
25+
'T' could be instantiated with an arbitrary type which could be unrelated to 'Pick<T, NonFunctionPropertyNames<T>>'.
26+
tests/cases/conformance/types/conditional/conditionalTypes1.ts(106,5): error TS2322: Type 'Pick<T, NonFunctionPropertyNames<T>>' is not assignable to type 'Pick<T, FunctionPropertyNames<T>>'.
27+
tests/cases/conformance/types/conditional/conditionalTypes1.ts(108,5): error TS2322: Type 'Pick<T, FunctionPropertyNames<T>>' is not assignable to type 'Pick<T, NonFunctionPropertyNames<T>>'.
4028
tests/cases/conformance/types/conditional/conditionalTypes1.ts(114,5): error TS2322: Type 'keyof T' is not assignable to type 'FunctionPropertyNames<T>'.
4129
Type 'string | number | symbol' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'.
4230
Type 'string' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'.
@@ -200,32 +188,20 @@ tests/cases/conformance/types/conditional/conditionalTypes1.ts(288,43): error TS
200188
function f7<T>(x: T, y: FunctionProperties<T>, z: NonFunctionProperties<T>) {
201189
x = y; // Error
202190
~
203-
!!! error TS2322: Type 'FunctionProperties<T>' is not assignable to type 'T'.
204-
!!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'FunctionProperties<T>'.
191+
!!! error TS2322: Type 'Pick<T, FunctionPropertyNames<T>>' is not assignable to type 'T'.
192+
!!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'Pick<T, FunctionPropertyNames<T>>'.
205193
x = z; // Error
206194
~
207-
!!! error TS2322: Type 'NonFunctionProperties<T>' is not assignable to type 'T'.
208-
!!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'NonFunctionProperties<T>'.
195+
!!! error TS2322: Type 'Pick<T, NonFunctionPropertyNames<T>>' is not assignable to type 'T'.
196+
!!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'Pick<T, NonFunctionPropertyNames<T>>'.
209197
y = x;
210198
y = z; // Error
211199
~
212-
!!! error TS2322: Type 'NonFunctionProperties<T>' is not assignable to type 'FunctionProperties<T>'.
213-
!!! error TS2322: Type 'FunctionPropertyNames<T>' is not assignable to type 'NonFunctionPropertyNames<T>'.
214-
!!! error TS2322: Type 'keyof T' is not assignable to type 'T[keyof T] extends Function ? never : keyof T'.
215-
!!! error TS2322: Type 'string | number | symbol' is not assignable to type 'T[keyof T] extends Function ? never : keyof T'.
216-
!!! error TS2322: Type 'string' is not assignable to type 'T[keyof T] extends Function ? never : keyof T'.
217-
!!! error TS2322: Type 'keyof T' is not assignable to type 'never'.
218-
!!! error TS2322: Type 'string | number | symbol' is not assignable to type 'never'.
219-
!!! error TS2322: Type 'string' is not assignable to type 'never'.
200+
!!! error TS2322: Type 'Pick<T, NonFunctionPropertyNames<T>>' is not assignable to type 'Pick<T, FunctionPropertyNames<T>>'.
220201
z = x;
221202
z = y; // Error
222203
~
223-
!!! error TS2322: Type 'FunctionProperties<T>' is not assignable to type 'NonFunctionProperties<T>'.
224-
!!! error TS2322: Type 'NonFunctionPropertyNames<T>' is not assignable to type 'FunctionPropertyNames<T>'.
225-
!!! error TS2322: Type 'keyof T' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'.
226-
!!! error TS2322: Type 'string | number | symbol' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'.
227-
!!! error TS2322: Type 'string' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'.
228-
!!! error TS2322: Type 'keyof T' is not assignable to type 'never'.
204+
!!! error TS2322: Type 'Pick<T, FunctionPropertyNames<T>>' is not assignable to type 'Pick<T, NonFunctionPropertyNames<T>>'.
229205
}
230206

231207
function f8<T>(x: keyof T, y: FunctionPropertyNames<T>, z: NonFunctionPropertyNames<T>) {

tests/baselines/reference/conditionalTypes1.types

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -229,55 +229,55 @@ type FunctionPropertyNames<T> = { [K in keyof T]: T[K] extends Function ? K : ne
229229
>FunctionPropertyNames : FunctionPropertyNames<T>
230230

231231
type FunctionProperties<T> = Pick<T, FunctionPropertyNames<T>>;
232-
>FunctionProperties : FunctionProperties<T>
232+
>FunctionProperties : Pick<T, FunctionPropertyNames<T>>
233233

234234
type NonFunctionPropertyNames<T> = { [K in keyof T]: T[K] extends Function ? never : K }[keyof T];
235235
>NonFunctionPropertyNames : NonFunctionPropertyNames<T>
236236

237237
type NonFunctionProperties<T> = Pick<T, NonFunctionPropertyNames<T>>;
238-
>NonFunctionProperties : NonFunctionProperties<T>
238+
>NonFunctionProperties : Pick<T, NonFunctionPropertyNames<T>>
239239

240240
type T30 = FunctionProperties<Part>;
241-
>T30 : { updatePart: (newName: string) => void; }
241+
>T30 : Pick<Part, "updatePart">
242242

243243
type T31 = NonFunctionProperties<Part>;
244-
>T31 : { id: number; name: string; subparts: Part[]; }
244+
>T31 : Pick<Part, NonFunctionPropertyNames<Part>>
245245

246246
function f7<T>(x: T, y: FunctionProperties<T>, z: NonFunctionProperties<T>) {
247247
>f7 : <T>(x: T, y: FunctionProperties<T>, z: NonFunctionProperties<T>) => void
248248
>x : T
249-
>y : FunctionProperties<T>
250-
>z : NonFunctionProperties<T>
249+
>y : Pick<T, FunctionPropertyNames<T>>
250+
>z : Pick<T, NonFunctionPropertyNames<T>>
251251

252252
x = y; // Error
253-
>x = y : FunctionProperties<T>
253+
>x = y : Pick<T, FunctionPropertyNames<T>>
254254
>x : T
255-
>y : FunctionProperties<T>
255+
>y : Pick<T, FunctionPropertyNames<T>>
256256

257257
x = z; // Error
258-
>x = z : NonFunctionProperties<T>
258+
>x = z : Pick<T, NonFunctionPropertyNames<T>>
259259
>x : T
260-
>z : NonFunctionProperties<T>
260+
>z : Pick<T, NonFunctionPropertyNames<T>>
261261

262262
y = x;
263263
>y = x : T
264-
>y : FunctionProperties<T>
264+
>y : Pick<T, FunctionPropertyNames<T>>
265265
>x : T
266266

267267
y = z; // Error
268-
>y = z : NonFunctionProperties<T>
269-
>y : FunctionProperties<T>
270-
>z : NonFunctionProperties<T>
268+
>y = z : Pick<T, NonFunctionPropertyNames<T>>
269+
>y : Pick<T, FunctionPropertyNames<T>>
270+
>z : Pick<T, NonFunctionPropertyNames<T>>
271271

272272
z = x;
273273
>z = x : T
274-
>z : NonFunctionProperties<T>
274+
>z : Pick<T, NonFunctionPropertyNames<T>>
275275
>x : T
276276

277277
z = y; // Error
278-
>z = y : FunctionProperties<T>
279-
>z : NonFunctionProperties<T>
280-
>y : FunctionProperties<T>
278+
>z = y : Pick<T, FunctionPropertyNames<T>>
279+
>z : Pick<T, NonFunctionPropertyNames<T>>
280+
>y : Pick<T, FunctionPropertyNames<T>>
281281
}
282282

283283
function f8<T>(x: keyof T, y: FunctionPropertyNames<T>, z: NonFunctionPropertyNames<T>) {

tests/baselines/reference/conditionalTypes2.types

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ declare type IResponse<T> = {
489489

490490
sendValue(name: keyof GetAllPropertiesOfType<T, string>): void;
491491
>sendValue : (name: keyof GetAllPropertiesOfType<T, string>) => void
492-
>name : GetPropertyNamesOfType<Required<T>, string>
492+
>name : keyof Pick<T, GetPropertyNamesOfType<Required<T>, string>>
493493

494494
};
495495

@@ -500,7 +500,7 @@ declare type GetPropertyNamesOfType<T, RestrictToType> = {
500500
}[Extract<keyof T, string>];
501501

502502
declare type GetAllPropertiesOfType<T, RestrictToType> = Pick<
503-
>GetAllPropertiesOfType : GetAllPropertiesOfType<T, RestrictToType>
503+
>GetAllPropertiesOfType : Pick<T, GetPropertyNamesOfType<Required<T>, RestrictToType>>
504504

505505
T,
506506
GetPropertyNamesOfType<Required<T>, RestrictToType>

0 commit comments

Comments
 (0)