mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
Added typings for array-unique
This commit is contained in:
parent
52bde4982f
commit
a69c902e93
9
types/array-unique/array-unique-tests.ts
Normal file
9
types/array-unique/array-unique-tests.ts
Normal 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
types/array-unique/index.d.ts
vendored
Normal file
12
types/array-unique/index.d.ts
vendored
Normal 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
types/array-unique/tsconfig.json
Normal file
23
types/array-unique/tsconfig.json
Normal 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
types/array-unique/tslint.json
Normal file
1
types/array-unique/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Loading…
Reference in New Issue
Block a user