UNPKG

1.2 kBTypeScriptView Raw
1import { Dirent, Stats } from 'fs';
2import { GlobOptions } from 'glob';
3export declare const isRimrafOptions: (o: any) => o is RimrafOptions;
4export declare const assertRimrafOptions: (o: any) => void;
5export interface RimrafAsyncOptions {
6 preserveRoot?: boolean;
7 tmp?: string;
8 maxRetries?: number;
9 retryDelay?: number;
10 backoff?: number;
11 maxBackoff?: number;
12 signal?: AbortSignal;
13 glob?: boolean | GlobOptions;
14 filter?: ((path: string, ent: Dirent | Stats) => boolean) | ((path: string, ent: Dirent | Stats) => Promise<boolean>);
15}
16export interface RimrafSyncOptions extends RimrafAsyncOptions {
17 filter?: (path: string, ent: Dirent | Stats) => boolean;
18}
19export type RimrafOptions = RimrafSyncOptions | RimrafAsyncOptions;
20export declare const optArg: (opt?: RimrafAsyncOptions) => (RimrafAsyncOptions & {
21 glob: GlobOptions & {
22 withFileTypes: false;
23 };
24}) | (RimrafAsyncOptions & {
25 glob: undefined;
26});
27export declare const optArgSync: (opt?: RimrafSyncOptions) => (RimrafSyncOptions & {
28 glob: GlobOptions & {
29 withFileTypes: false;
30 };
31}) | (RimrafSyncOptions & {
32 glob: undefined;
33});
34//# sourceMappingURL=opt-arg.d.ts.map
\No newline at end of file