Add object-assign and tests

This commit is contained in:
Christopher Brown
2015-09-02 21:59:17 -05:00
parent 04a025ada3
commit 62c95cb5f5
2 changed files with 26 additions and 0 deletions

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
object-assign/object-assign.d.ts vendored Normal file
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;
}