index.d.ts 955 B

123456789101112131415161718192021222324
  1. import { TransformFunction as Transform, IPartialOptions } from './out/managers/options';
  2. import { ITask } from './out/managers/tasks';
  3. import { Entry, EntryItem } from './out/types/entries';
  4. import { Pattern } from './out/types/patterns';
  5. declare namespace FastGlob {
  6. type Options<T = EntryItem> = IPartialOptions<T>;
  7. type TransformFunction<T> = Transform<T>;
  8. type Task = ITask;
  9. interface IApi {
  10. <T = EntryItem>(patterns: Pattern | Pattern[], options?: IPartialOptions<T>): Promise<T[]>;
  11. async<T = EntryItem>(patterns: Pattern | Pattern[], options?: IPartialOptions<T>): Promise<T[]>;
  12. sync<T = EntryItem>(patterns: Pattern | Pattern[], options?: IPartialOptions<T>): T[];
  13. stream(patterns: Pattern | Pattern[], options?: IPartialOptions): NodeJS.ReadableStream;
  14. generateTasks(patterns: Pattern | Pattern[], options?: IPartialOptions): Task[];
  15. }
  16. }
  17. declare const FastGlob: FastGlob.IApi;
  18. export = FastGlob;
  19. export as namespace FastGlob;