Merge pull request #21435 from mrmlnc/arr_union

[arr-union] Add typings for "arr-union" package
This commit is contained in:
Nathan Shively-Sanders
2017-11-13 16:23:36 -08:00
committed by GitHub
4 changed files with 39 additions and 0 deletions
+7
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
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;
+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",
"arr-union-tests.ts"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }