From 23323ac31a4eb5fb2f273571532db7caa8324959 Mon Sep 17 00:00:00 2001 From: falsandtru Date: Sat, 21 Jan 2017 18:55:50 +0900 Subject: [PATCH] Use Partial types for Object.assign --- lib/lib.es2015.core.d.ts | 8 ++++++++ lib/lib.es6.d.ts | 8 ++++++++ src/lib/es2015.core.d.ts | 8 ++++++++ 3 files changed, 24 insertions(+) diff --git a/lib/lib.es2015.core.d.ts b/lib/lib.es2015.core.d.ts index 7f03aaec04d02..43592cbc9b8d5 100644 --- a/lib/lib.es2015.core.d.ts +++ b/lib/lib.es2015.core.d.ts @@ -292,6 +292,14 @@ interface Object { } interface ObjectConstructor { + /** + * Copy the values of all of the enumerable own properties from one or more source objects to a + * target object. Returns the target object. + * @param target The target object to copy to. + * @param sources One or more source objects from which to copy properties + */ + assign(target: Partial, ...sources: Partial[]): T; + /** * Copy the values of all of the enumerable own properties from one or more source objects to a * target object. Returns the target object. diff --git a/lib/lib.es6.d.ts b/lib/lib.es6.d.ts index 1c5224c0cc8e7..50857439e361f 100644 --- a/lib/lib.es6.d.ts +++ b/lib/lib.es6.d.ts @@ -4470,6 +4470,14 @@ interface Object { } interface ObjectConstructor { + /** + * Copy the values of all of the enumerable own properties from one or more source objects to a + * target object. Returns the target object. + * @param target The target object to copy to. + * @param sources One or more source objects from which to copy properties + */ + assign(target: Partial, ...sources: Partial[]): T; + /** * Copy the values of all of the enumerable own properties from one or more source objects to a * target object. Returns the target object. diff --git a/src/lib/es2015.core.d.ts b/src/lib/es2015.core.d.ts index 356512ecf5848..4a70d3f38180a 100644 --- a/src/lib/es2015.core.d.ts +++ b/src/lib/es2015.core.d.ts @@ -272,6 +272,14 @@ interface Object { } interface ObjectConstructor { + /** + * Copy the values of all of the enumerable own properties from one or more source objects to a + * target object. Returns the target object. + * @param target The target object to copy to. + * @param sources One or more source objects from which to copy properties + */ + assign(target: Partial, ...sources: Partial[]): T; + /** * Copy the values of all of the enumerable own properties from one or more source objects to a * target object. Returns the target object.