From 62c95cb5f5a51f6875c9fbd8b5e26d2284f024c9 Mon Sep 17 00:00:00 2001 From: Christopher Brown Date: Wed, 2 Sep 2015 21:59:17 -0500 Subject: [PATCH] Add object-assign and tests --- object-assign/object-assign-tests.ts | 17 +++++++++++++++++ object-assign/object-assign.d.ts | 9 +++++++++ 2 files changed, 26 insertions(+) create mode 100644 object-assign/object-assign-tests.ts create mode 100644 object-assign/object-assign.d.ts diff --git a/object-assign/object-assign-tests.ts b/object-assign/object-assign-tests.ts new file mode 100644 index 000000000..53dfd5e70 --- /dev/null +++ b/object-assign/object-assign-tests.ts @@ -0,0 +1,17 @@ +/// +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; +} diff --git a/object-assign/object-assign.d.ts b/object-assign/object-assign.d.ts new file mode 100644 index 000000000..76789d003 --- /dev/null +++ b/object-assign/object-assign.d.ts @@ -0,0 +1,9 @@ +// Type definitions for object-assign 4.0.1 +// Project: https://github.com/sindresorhus/object-assign +// Definitions by: Christopher Brown +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare module "object-assign" { + function objectAssign(target: any, ...sources: any[]): any; + export = objectAssign; +}