UNPKG

@grammyjs/i18n

Version:

Internationalization plugin for grammY based on Fluent.

40 lines 1.4 kB
import { WalkEntry } from "./_util.js"; export declare class WalkError extends Error { cause: unknown; name: string; path: string; constructor(cause: unknown, path: string); } export interface WalkOptions { /** @default {Infinity} */ maxDepth?: number; /** @default {true} */ includeFiles?: boolean; /** @default {true} */ includeDirs?: boolean; /** @default {false} */ followSymlinks?: boolean; exts?: string[]; match?: RegExp[]; skip?: RegExp[]; } export type { WalkEntry }; /** * Walks the file tree rooted at root, yielding each file or directory in the * tree filtered according to the given options. * * @example * ```ts * import { walk } from "https://deno.land/std@$STD_VERSION/fs/walk.ts"; * import { assert } from "https://deno.land/std@$STD_VERSION/testing/asserts.ts"; * * for await (const entry of walk(".")) { * console.log(entry.path); * assert(entry.isFile); * } * ``` */ export declare function walk(root: string | URL, { maxDepth, includeFiles, includeDirs, followSymlinks, exts, match, skip, }?: WalkOptions): AsyncIterableIterator<WalkEntry>; /** Same as walk() but uses synchronous ops */ export declare function walkSync(root: string | URL, { maxDepth, includeFiles, includeDirs, followSymlinks, exts, match, skip, }?: WalkOptions): IterableIterator<WalkEntry>; //# sourceMappingURL=walk.d.ts.map