feat(types): Add typings for "arr-union" package

This commit is contained in:
Denis Malinochkin 2017-11-11 19:25:17 +03:00
parent 1a051f0000
commit cd481a908a
4 changed files with 39 additions and 0 deletions

View File

@ -0,0 +1,7 @@
import union = require('arr-union');
// $ExpectType string[]
union(['a'], ['b', 'c'], ['d', 'e', 'f']);
// $ExpectType number[]
union([1, 1], [2, 3]);

8
types/arr-union/index.d.ts vendored Normal file
View File

@ -0,0 +1,8 @@
// Type definitions for arr-union 3.1
// Project: https://github.com/jonschlinkert/arr-union
// Definitions by: mrmlnc <https://github.com/mrmlnc>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare function union<T>(...arrays: Array<ArrayLike<T>>): T[];
export = union;

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",
"arr-union-tests.ts"
]
}

View File

@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }