mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-04 17:20:09 +00:00
Add types for negative-array
This commit is contained in:
8
types/negative-array/index.d.ts
vendored
Normal file
8
types/negative-array/index.d.ts
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
// Type definitions for negative-array 2.0
|
||||
// Project: https://github.com/sindresorhus/negative-array#readme
|
||||
// Definitions by: BendingBender <https://github.com/BendingBender>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export = negativeArray;
|
||||
|
||||
declare function negativeArray<T>(array: T[]): T[];
|
||||
5
types/negative-array/negative-array-tests.ts
Normal file
5
types/negative-array/negative-array-tests.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import negativeArray = require('negative-array');
|
||||
|
||||
const unicorn = negativeArray(['pony', 'cake', 'rainbow']);
|
||||
|
||||
unicorn[-1];
|
||||
23
types/negative-array/tsconfig.json
Normal file
23
types/negative-array/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",
|
||||
"negative-array-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/negative-array/tslint.json
Normal file
1
types/negative-array/tslint.json
Normal file
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user