-
-
Notifications
You must be signed in to change notification settings - Fork 139
Open
Description
The return typing of fs.promise.glob
in memfs is incorrect. It returns Promise<string[]>
instead of NodeJS.AsyncIterator<string>
glob: (pattern: string, options?: opts.IGlobOptions) => Promise<string[]>;
/**
* ```js
* import { glob } from 'node:fs/promises';
*
* for await (const entry of glob('*.js'))
* console.log(entry);
* ```
* @since v22.0.0
* @returns An AsyncIterator that yields the paths of files
* that match the pattern.
*/
function glob(pattern: string | readonly string[]): NodeJS.AsyncIterator<string>;
function glob(
pattern: string | readonly string[],
options: GlobOptionsWithFileTypes,
): NodeJS.AsyncIterator<Dirent>;
function glob(
pattern: string | readonly string[],
options: GlobOptionsWithoutFileTypes,
): NodeJS.AsyncIterator<string>;
function glob(
pattern: string | readonly string[],
options: GlobOptions,
): NodeJS.AsyncIterator<Dirent | string>;
OlofFredrikssonCopilot and alexgagnon
Metadata
Metadata
Assignees
Labels
No labels