1 |
|
2 | import * as taskManager from './managers/tasks';
|
3 | import { Options as OptionsInternal } from './settings';
|
4 | import { Entry as EntryInternal, FileSystemAdapter as FileSystemAdapterInternal, Pattern as PatternInternal } from './types';
|
5 | type EntryObjectModePredicate = {
|
6 | [TKey in keyof Pick<OptionsInternal, 'objectMode'>]-?: true;
|
7 | };
|
8 | type EntryStatsPredicate = {
|
9 | [TKey in keyof Pick<OptionsInternal, 'stats'>]-?: true;
|
10 | };
|
11 | type EntryObjectPredicate = EntryObjectModePredicate | EntryStatsPredicate;
|
12 | declare function FastGlob(source: PatternInternal | PatternInternal[], options: OptionsInternal & EntryObjectPredicate): Promise<EntryInternal[]>;
|
13 | declare function FastGlob(source: PatternInternal | PatternInternal[], options?: OptionsInternal): Promise<string[]>;
|
14 | declare namespace FastGlob {
|
15 | type Options = OptionsInternal;
|
16 | type Entry = EntryInternal;
|
17 | type Task = taskManager.Task;
|
18 | type Pattern = PatternInternal;
|
19 | type FileSystemAdapter = FileSystemAdapterInternal;
|
20 | const glob: typeof FastGlob;
|
21 | const globSync: typeof sync;
|
22 | const globStream: typeof stream;
|
23 | const async: typeof FastGlob;
|
24 | function sync(source: PatternInternal | PatternInternal[], options: OptionsInternal & EntryObjectPredicate): EntryInternal[];
|
25 | function sync(source: PatternInternal | PatternInternal[], options?: OptionsInternal): string[];
|
26 | function stream(source: PatternInternal | PatternInternal[], options?: OptionsInternal): NodeJS.ReadableStream;
|
27 | function generateTasks(source: PatternInternal | PatternInternal[], options?: OptionsInternal): Task[];
|
28 | function isDynamicPattern(source: PatternInternal, options?: OptionsInternal): boolean;
|
29 | function escapePath(source: string): PatternInternal;
|
30 | function convertPathToPattern(source: string): PatternInternal;
|
31 | namespace posix {
|
32 | function escapePath(source: string): PatternInternal;
|
33 | function convertPathToPattern(source: string): PatternInternal;
|
34 | }
|
35 | namespace win32 {
|
36 | function escapePath(source: string): PatternInternal;
|
37 | function convertPathToPattern(source: string): PatternInternal;
|
38 | }
|
39 | }
|
40 | export = FastGlob;
|