1import { Minipass } from 'minipass'; 2import { Path } from 'path-scurry'; 3import type { GlobOptions, GlobOptionsWithFileTypesFalse, GlobOptionsWithFileTypesTrue, GlobOptionsWithFileTypesUnset } from './glob.js'; 4import { Glob } from './glob.js'; 5/** 6 * Syncronous form of {@link globStream}. Will read all the matches as fast as 7 * you consume them, even all in a single tick if you consume them immediately, 8 * but will still respond to backpressure if they're not consumed immediately. 9 */ 10export declare function globStreamSync(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Minipass<Path, Path>; 11export declare function globStreamSync(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): Minipass<string, string>; 12export declare function globStreamSync(pattern: string | string[], options: GlobOptionsWithFileTypesUnset): Minipass<string, string>; 13export declare function globStreamSync(pattern: string | string[], options: GlobOptions): Minipass<Path, Path> | Minipass<string, string>; 14/** 15 * Return a stream that emits all the strings or `Path` objects and 16 * then emits `end` when completed. 17 */ 18export declare function globStream(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): Minipass<string, string>; 19export declare function globStream(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Minipass<Path, Path>; 20export declare function globStream(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): Minipass<string, string>; 21export declare function globStream(pattern: string | string[], options: GlobOptions): Minipass<Path, Path> | Minipass<string, string>; 22/** 23 * Synchronous form of {@link glob} 24 */ 25export declare function globSync(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): string[]; 26export declare function globSync(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Path[]; 27export declare function globSync(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): string[]; 28export declare function globSync(pattern: string | string[], options: GlobOptions): Path[] | string[]; 29/** 30 * Perform an asynchronous glob search for the pattern(s) specified. Returns 31 * [Path](https://isaacs.github.io/path-scurry/classes/PathBase) objects if the 32 * {@link withFileTypes} option is set to `true`. See {@link GlobOptions} for 33 * full option descriptions. 34 */ 35declare function glob_(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): Promise<string[]>; 36declare function glob_(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Promise<Path[]>; 37declare function glob_(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): Promise<string[]>; 38declare function glob_(pattern: string | string[], options: GlobOptions): Promise<Path[] | string[]>; 39/** 40 * Return a sync iterator for walking glob pattern matches. 41 */ 42export declare function globIterateSync(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): Generator<string, void, void>; 43export declare function globIterateSync(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Generator<Path, void, void>; 44export declare function globIterateSync(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): Generator<string, void, void>; 45export declare function globIterateSync(pattern: string | string[], options: GlobOptions): Generator<Path, void, void> | Generator<string, void, void>; 46/** 47 * Return an async iterator for walking glob pattern matches. 48 */ 49export declare function globIterate(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): AsyncGenerator<string, void, void>; 50export declare function globIterate(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): AsyncGenerator<Path, void, void>; 51export declare function globIterate(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): AsyncGenerator<string, void, void>; 52export declare function globIterate(pattern: string | string[], options: GlobOptions): AsyncGenerator<Path, void, void> | AsyncGenerator<string, void, void>; 53export declare const streamSync: typeof globStreamSync; 54export declare const stream: typeof globStream & { 55 sync: typeof globStreamSync; 56}; 57export declare const iterateSync: typeof globIterateSync; 58export declare const iterate: typeof globIterate & { 59 sync: typeof globIterateSync; 60}; 61export declare const sync: typeof globSync & { 62 stream: typeof globStreamSync; 63 iterate: typeof globIterateSync; 64}; 65export { escape, unescape } from 'minimatch'; 66export { Glob } from './glob.js'; 67export type { GlobOptions, GlobOptionsWithFileTypesFalse, GlobOptionsWithFileTypesTrue, GlobOptionsWithFileTypesUnset, } from './glob.js'; 68export { hasMagic } from './has-magic.js'; 69export type { IgnoreLike } from './ignore.js'; 70export type { MatchStream } from './walker.js'; 71export declare const glob: typeof glob_ & { 72 glob: typeof glob_; 73 globSync: typeof globSync; 74 sync: typeof globSync & { 75 stream: typeof globStreamSync; 76 iterate: typeof globIterateSync; 77 }; 78 globStream: typeof globStream; 79 stream: typeof globStream & { 80 sync: typeof globStreamSync; 81 }; 82 globStreamSync: typeof globStreamSync; 83 streamSync: typeof globStreamSync; 84 globIterate: typeof globIterate; 85 iterate: typeof globIterate & { 86 sync: typeof globIterateSync; 87 }; 88 globIterateSync: typeof globIterateSync; 89 iterateSync: typeof globIterateSync; 90 Glob: typeof Glob; 91 hasMagic: (pattern: string | string[], options?: GlobOptions) => boolean; 92 escape: (s: string, { windowsPathsNoEscape, }?: Pick<import("minimatch").MinimatchOptions, "windowsPathsNoEscape"> | undefined) => string; 93 unescape: (s: string, { windowsPathsNoEscape, }?: Pick<import("minimatch").MinimatchOptions, "windowsPathsNoEscape"> | undefined) => string; 94}; 95//# sourceMappingURL=index.d.ts.map