-
Notifications
You must be signed in to change notification settings - Fork 208
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add generic for object-merge type (#466)
- Loading branch information
1 parent
1268d78
commit 80b15e1
Showing
2 changed files
with
13 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
// Definitions by: nokazn <https://github.com/nokazn> | ||
declare function merge(obj1: object, ...objs: object[]): object; | ||
declare function merge< | ||
TObj1 extends object = object, | ||
TObjs extends object = object | ||
>(obj1: TObj1, ...objs: TObjs[]): TObj1 & TObjs; | ||
export default merge; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters