mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 19:07:08 +00:00
matchdep (#43094)
This commit is contained in:
parent
48f8cf6bd1
commit
ea2c63dc94
18
types/matchdep/index.d.ts
vendored
Normal file
18
types/matchdep/index.d.ts
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
// Type definitions for matchdep 2.0
|
||||
// Project: https://github.com/tkellen/js-matchdep
|
||||
// Definitions by: tpluscode <https://github.com/tpluscode>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare namespace matchdep {
|
||||
type FilterConfig = string | object;
|
||||
type FilterFunction = (pattern: string | string[], config?: FilterConfig) => string[];
|
||||
}
|
||||
|
||||
declare const matchdep: {
|
||||
readonly filter: matchdep.FilterFunction
|
||||
readonly filterDev: matchdep.FilterFunction
|
||||
readonly filterPeer: matchdep.FilterFunction
|
||||
readonly filterAll: matchdep.FilterFunction
|
||||
};
|
||||
|
||||
export = matchdep;
|
||||
9
types/matchdep/matchdep-tests.ts
Normal file
9
types/matchdep/matchdep-tests.ts
Normal file
@ -0,0 +1,9 @@
|
||||
import matchdep = require('matchdep');
|
||||
|
||||
const packageJson = {};
|
||||
|
||||
const singlePattern = matchdep.filter('mini*');
|
||||
const devDependencies = matchdep.filterDev('grunt-contrib-*', './package.json');
|
||||
const peerDependencies = matchdep.filterPeer('foo-{bar,baz}', './some-other.json');
|
||||
const all = matchdep.filterAll('*', packageJson);
|
||||
const arrayPaterns = matchdep.filterAll(['*', '!grunt']);
|
||||
23
types/matchdep/tsconfig.json
Normal file
23
types/matchdep/tsconfig.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"matchdep-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/matchdep/tslint.json
Normal file
1
types/matchdep/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Loading…
Reference in New Issue
Block a user