mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 12:56:46 +08:00
Add object-assign and tests
This commit is contained in:
17
object-assign/object-assign-tests.ts
Normal file
17
object-assign/object-assign-tests.ts
Normal 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
9
object-assign/object-assign.d.ts
vendored
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user