Merge pull request #5659 from chbrown/object-assign

Add object-assign and tests
This commit is contained in:
Horiuchi_H
2015-09-08 09:45:55 +09:00
2 changed files with 26 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
/// <reference path="object-assign.d.ts" />
import objectAssign = require("object-assign");
function assign1() {
var result = objectAssign({hello: "world"});
return result;
}
function assign2() {
var result = objectAssign({hello: "world"}, {hello: "worlds", second: "extra"});
return result;
}
function assign3() {
var result = objectAssign({hello: "world"}, {hello: "worlds", second: "extra"}, {hello: "stop", the: "spinning"});
return result;
}
+9
View File
@@ -0,0 +1,9 @@
// Type definitions for object-assign 4.0.1
// Project: https://github.com/sindresorhus/object-assign
// Definitions by: Christopher Brown <https://github.com/chbrown>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module "object-assign" {
function objectAssign(target: any, ...sources: any[]): any;
export = objectAssign;
}