| Leo Repp | 58b9f11 | 2021-11-22 11:57:47 +0100 | [diff] [blame^] | 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 | |
| 6 | declare namespace FastGlob { |
| 7 | type Options<T = EntryItem> = IPartialOptions<T>; |
| 8 | type TransformFunction<T> = Transform<T>; |
| 9 | type Task = ITask; |
| 10 | |
| 11 | interface IApi { |
| 12 | <T = EntryItem>(patterns: Pattern | Pattern[], options?: IPartialOptions<T>): Promise<T[]>; |
| 13 | |
| 14 | async<T = EntryItem>(patterns: Pattern | Pattern[], options?: IPartialOptions<T>): Promise<T[]>; |
| 15 | sync<T = EntryItem>(patterns: Pattern | Pattern[], options?: IPartialOptions<T>): T[]; |
| 16 | stream(patterns: Pattern | Pattern[], options?: IPartialOptions): NodeJS.ReadableStream; |
| 17 | generateTasks(patterns: Pattern | Pattern[], options?: IPartialOptions): Task[]; |
| 18 | } |
| 19 | } |
| 20 | |
| 21 | declare const FastGlob: FastGlob.IApi; |
| 22 | |
| 23 | export = FastGlob; |
| 24 | export as namespace FastGlob; |