Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6969986

Browse filesBrowse files
committed
Use intersection types in Object.assing defintion
1 parent e200dad commit 6969986
Copy full SHA for 6969986

1 file changed

+27Lines changed: 27 additions & 0 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/lib/es6.d.ts‎

Copy file name to clipboardExpand all lines: src/lib/es6.d.ts
+27Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,33 @@ interface Object {
121121
}
122122

123123
interface ObjectConstructor {
124+
/**
125+
* Copy the values of all of the enumerable own properties from one or more source objects to a
126+
* target object. Returns the target object.
127+
* @param target The target object to copy to.
128+
* @param source source objects to copy properties from.
129+
*/
130+
assign<T, U>(target: T, source: U): T & U;
131+
132+
/**
133+
* Copy the values of all of the enumerable own properties from one or more source objects to a
134+
* target object. Returns the target object.
135+
* @param target The target object to copy to.
136+
* @param source1 first source objects to copy properties from.
137+
* @param source2 second source objects to copy properties from.
138+
*/
139+
assign<T, U, V>(target: T, source1: U, source2: V): T & U & V;
140+
141+
/**
142+
* Copy the values of all of the enumerable own properties from one or more source objects to a
143+
* target object. Returns the target object.
144+
* @param target The target object to copy to.
145+
* @param source1 first source objects to copy properties from.
146+
* @param source2 second source objects to copy properties from.
147+
* @param source3 second source objects to copy properties from.
148+
*/
149+
assign<T, U, V, W>(target: T, source1: U, source2: V, source3: W): T & U & V & W;
150+
124151
/**
125152
* Copy the values of all of the enumerable own properties from one or more source objects to a
126153
* target object. Returns the target object.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.