Merge pull request #24316 from CSLTech/array-unique

Added typings for array-unique
This commit is contained in:
Arthur Ozga
2018-03-15 12:45:26 -07:00
committed by GitHub
4 changed files with 45 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
import arrayUnique = require("array-unique");
arrayUnique([1, 1, 2, 3, 3]);
arrayUnique(["foo", "foo", "bar", "foo"]);
arrayUnique.immutable([1, 1, 2, 3, 3]);
arrayUnique.immutable(["foo", "foo", "bar", "foo"]);
+12
View File
@@ -0,0 +1,12 @@
// Type definitions for array-unique 0.3
// Project: https://github.com/jonschlinkert/array-unique
// Definitions by: Michaël St-Georges <https://github.com/CSLTech>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare function arrayUnique<T>(arr: T[]): T[];
declare namespace arrayUnique {
function immutable<T>(arr: ReadonlyArray<T>): T[];
}
export = arrayUnique;
+23
View File
@@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"array-unique-tests.ts"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }