Skip to content

Commit 23323ac

Browse files
author
falsandtru
committed
Use Partial types for Object.assign
1 parent 4ee8213 commit 23323ac

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

lib/lib.es2015.core.d.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,14 @@ interface Object {
292292
}
293293

294294
interface ObjectConstructor {
295+
/**
296+
* Copy the values of all of the enumerable own properties from one or more source objects to a
297+
* target object. Returns the target object.
298+
* @param target The target object to copy to.
299+
* @param sources One or more source objects from which to copy properties
300+
*/
301+
assign<T>(target: Partial<T>, ...sources: Partial<T>[]): T;
302+
295303
/**
296304
* Copy the values of all of the enumerable own properties from one or more source objects to a
297305
* target object. Returns the target object.

lib/lib.es6.d.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4470,6 +4470,14 @@ interface Object {
44704470
}
44714471

44724472
interface ObjectConstructor {
4473+
/**
4474+
* Copy the values of all of the enumerable own properties from one or more source objects to a
4475+
* target object. Returns the target object.
4476+
* @param target The target object to copy to.
4477+
* @param sources One or more source objects from which to copy properties
4478+
*/
4479+
assign<T>(target: Partial<T>, ...sources: Partial<T>[]): T;
4480+
44734481
/**
44744482
* Copy the values of all of the enumerable own properties from one or more source objects to a
44754483
* target object. Returns the target object.

src/lib/es2015.core.d.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,14 @@ interface Object {
272272
}
273273

274274
interface ObjectConstructor {
275+
/**
276+
* Copy the values of all of the enumerable own properties from one or more source objects to a
277+
* target object. Returns the target object.
278+
* @param target The target object to copy to.
279+
* @param sources One or more source objects from which to copy properties
280+
*/
281+
assign<T>(target: Partial<T>, ...sources: Partial<T>[]): T;
282+
275283
/**
276284
* Copy the values of all of the enumerable own properties from one or more source objects to a
277285
* target object. Returns the target object.

0 commit comments

Comments
 (0)