index.d.ts 763 B

1234567891011121314151617181920
  1. type AnymatchFn = (testString: string) => boolean;
  2. type AnymatchPattern = string|RegExp|AnymatchFn;
  3. type AnymatchMatcher = AnymatchPattern|AnymatchPattern[]
  4. type AnymatchTester = {
  5. (testString: string|any[], returnIndex: true): number;
  6. (testString: string|any[]): boolean;
  7. }
  8. type PicomatchOptions = {dot: boolean};
  9. declare const anymatch: {
  10. (matchers: AnymatchMatcher): AnymatchTester;
  11. (matchers: AnymatchMatcher, testString: null, returnIndex: true | PicomatchOptions): AnymatchTester;
  12. (matchers: AnymatchMatcher, testString: string|any[], returnIndex: true | PicomatchOptions): number;
  13. (matchers: AnymatchMatcher, testString: string|any[]): boolean;
  14. }
  15. export {AnymatchMatcher as Matcher}
  16. export {AnymatchTester as Tester}
  17. export default anymatch