[requireindex] Add types for v1.2 (#35360)

This commit is contained in:
Brad Zacher 2019-05-14 11:15:11 -07:00 committed by Nathan Shively-Sanders
parent b7f07cfbbd
commit e7ef1fe681
4 changed files with 39 additions and 0 deletions

11
types/requireindex/index.d.ts vendored Normal file
View File

@ -0,0 +1,11 @@
// Type definitions for requireindex 1.2
// Project: https://github.com/stephenhandley/requireindex
// Definitions by: Brad Zacher <https://github.com/bradzacher>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare function requireindex(
path: string,
basenames?: ReadonlyArray<string>,
): {[filename: string]: any};
export = requireindex;

View File

@ -0,0 +1,4 @@
import idx = require('requireindex');
const files = idx('.');
const filesWithBaseName = idx('.', ['again', 'somemore']);

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

View File

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