You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
763 B
TypeScript
21 lines
763 B
TypeScript
type AnymatchFn = (testString: string) => boolean;
|
|
type AnymatchPattern = string|RegExp|AnymatchFn;
|
|
type AnymatchMatcher = AnymatchPattern|AnymatchPattern[]
|
|
type AnymatchTester = {
|
|
(testString: string|any[], returnIndex: true): number;
|
|
(testString: string|any[]): boolean;
|
|
}
|
|
|
|
type PicomatchOptions = {dot: boolean};
|
|
|
|
declare const anymatch: {
|
|
(matchers: AnymatchMatcher): AnymatchTester;
|
|
(matchers: AnymatchMatcher, testString: null, returnIndex: true | PicomatchOptions): AnymatchTester;
|
|
(matchers: AnymatchMatcher, testString: string|any[], returnIndex: true | PicomatchOptions): number;
|
|
(matchers: AnymatchMatcher, testString: string|any[]): boolean;
|
|
}
|
|
|
|
export {AnymatchMatcher as Matcher}
|
|
export {AnymatchTester as Tester}
|
|
export default anymatch
|