From 7090b473b6f2d3ac94588cfef8e29bd380b8a7f4 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 6 Dec 2016 18:02:21 -0800 Subject: [PATCH] Added declarations for 'array-uniq'. (#13127) * Added declarations for 'array-uniq'. * Added linting for 'array-uniq'. * Removed patch number in 'array-uniq'. --- array-uniq/index-tests.ts | 5 +++++ array-uniq/index.d.ts | 8 ++++++++ array-uniq/tsconfig.json | 19 +++++++++++++++++++ array-uniq/tslint.json | 1 + 4 files changed, 33 insertions(+) create mode 100644 array-uniq/index-tests.ts create mode 100644 array-uniq/index.d.ts create mode 100644 array-uniq/tsconfig.json create mode 100644 array-uniq/tslint.json diff --git a/array-uniq/index-tests.ts b/array-uniq/index-tests.ts new file mode 100644 index 0000000000..8674d2508c --- /dev/null +++ b/array-uniq/index-tests.ts @@ -0,0 +1,5 @@ +import arrayUniq = require("array-uniq"); + +arrayUniq([1, 1, 2, 3, 3]); + +arrayUniq(["foo", "foo", "bar", "foo"]); \ No newline at end of file diff --git a/array-uniq/index.d.ts b/array-uniq/index.d.ts new file mode 100644 index 0000000000..25d97c0a94 --- /dev/null +++ b/array-uniq/index.d.ts @@ -0,0 +1,8 @@ +// Type definitions for array-uniq 1.0 +// Project: https://github.com/sindresorhus/array-uniq +// Definitions by: Daniel Rosenwasser +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare function arrayUniq(arr: T[]): T[]; + +export = arrayUniq; \ No newline at end of file diff --git a/array-uniq/tsconfig.json b/array-uniq/tsconfig.json new file mode 100644 index 0000000000..65624dedce --- /dev/null +++ b/array-uniq/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "index-tests.ts" + ] +} diff --git a/array-uniq/tslint.json b/array-uniq/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/array-uniq/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" }