Skip to content

Commit 6a84715

Browse files
Fix Object.assign
1 parent 0bb4da3 commit 6a84715

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

lib/lib.es2015.core.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ interface ObjectConstructor {
7474
assign<T, Ts extends readonly any[]>(
7575
target: T,
7676
...sources: Ts
77-
): UnionToIntersection<T | Ts[number]>;
77+
): First<UnionToIntersection<[T] | { [K in keyof Ts]: [Ts[K]] }[number]>>;
7878

7979
/**
8080
* Returns an array of all symbol properties found directly on object o.

lib/lib.es5.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
type First<T> = T extends [any] ? T[0] : unknown;
2+
13
type UnionToIntersection<T> = (
24
T extends any ? (arg: T) => void : never
35
) extends (arg: infer F) => void

lib/lib.util.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
type First<T> = T extends [any] ? T[0] : unknown;
2+
13
type UnionToIntersection<T> = (
24
T extends any ? (arg: T) => void : never
35
) extends (arg: infer F) => void

0 commit comments

Comments
 (0)