utils-merge: definition of the module has been added

This commit is contained in:
Ilya Mochalov
2015-10-19 06:38:26 +05:00
parent af5b8275d1
commit 511959a4a7
2 changed files with 19 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
/// <reference path="./utils-merge.d.ts" />
import merge from "utils-merge";
type Result = {a: string, b: number};
let result: Result;
result = merge<{a: string}, {b: number}, Result>({a: ''}, {b: 42});
+10
View File
@@ -0,0 +1,10 @@
// Type definitions for utils-merge
// Project: https://github.com/jaredhanson/utils-merge
// Definitions by: Ilya Mochalov <https://github.com/chrootsu>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module "utils-merge" {
function merge<TA, TB, TResult>(a: TA, b: TB): TResult;
export default merge;
}