File tree Expand file tree Collapse file tree 3 files changed +5
-1
lines changed Expand file tree Collapse file tree 3 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ interface ObjectConstructor {
74
74
assign < T , Ts extends readonly any [ ] > (
75
75
target : T ,
76
76
...sources : Ts
77
- ) : UnionToIntersection < T | Ts [ number ] > ;
77
+ ) : First < UnionToIntersection < [ T ] | { [ K in keyof Ts ] : [ Ts [ K ] ] } [ number ] > > ;
78
78
79
79
/**
80
80
* Returns an array of all symbol properties found directly on object o.
Original file line number Diff line number Diff line change
1
+ type First < T > = T extends [ any ] ? T [ 0 ] : unknown ;
2
+
1
3
type UnionToIntersection < T > = (
2
4
T extends any ? ( arg : T ) => void : never
3
5
) extends ( arg : infer F ) => void
Original file line number Diff line number Diff line change
1
+ type First < T > = T extends [ any ] ? T [ 0 ] : unknown ;
2
+
1
3
type UnionToIntersection < T > = (
2
4
T extends any ? ( arg : T ) => void : never
3
5
) extends ( arg : infer F ) => void
You can’t perform that action at this time.
0 commit comments