index.d.ts 660 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: string|any[], returnIndex: true | PicomatchOptions): number;
  12. (matchers: AnymatchMatcher, testString: string|any[]): boolean;
  13. }
  14. export {AnymatchMatcher as Matcher}
  15. export {AnymatchTester as Tester}
  16. export default anymatch