import { Stats } from 'node:fs'; type BaseOptions = { /** * Context directory. * @default process.cwd() */ context: string; /** * Relativize the paths in result. */ relativize: boolean; }; type FilterOptions = { /** * Pattern matcher to include for operation. */ includes?: string[]; /** * Pattern matcher to exclude for operation. */ excludes?: string[]; /** * Filter by some condition for operation. * return `true` to continue operation and `false` to skip it. */ filter?: (src: string, srcStats: Stats) => boolean; }; type OverwriteOptions = { /** * Overwrite existing file or directory. */ overwrite: boolean; }; type SingleHookOptions = { /** * Hook before each item been operated. */ beforeEach?: (path: string, stat: Stats) => any; /** * Hook after each item been operated. */ afterEach?: (path: string, stat: Stats) => any; }; type CrossHookOptions = { /** * Hook before each item been operated. */ beforeEach?: (src: string, dest: string) => any; /** * Hook after each item been operated. */ afterEach?: (src: string, dest: string) => any; }; type SingleOperationResult = { all: string[]; done: string[]; skip: string[]; }; type CrossOperationResult = { src: string[]; dest: string[]; add: string[]; update: string[]; skip: string[]; }; export type { BaseOptions, CrossHookOptions, CrossOperationResult, FilterOptions, OverwriteOptions, SingleHookOptions, SingleOperationResult };