-
Notifications
You must be signed in to change notification settings - Fork 13
/
index.d.ts
24 lines (20 loc) · 875 Bytes
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
export type options = {
cwd?: string;
type?: string;
forceSync?(filePath?: string): boolean;
exclude?: string | RegExp | Function | Array<string | RegExp | Function>;
watch?: boolean;
nodeep?: boolean;
deleteOrphaned?: boolean;
supportSymlink?: boolean;
afterEachSync?(params?: { eventType: string; nodeType: string; relativePath: string, srcPath: string; targetPath: string }): any;
filter?(filePath?: string): boolean;
onError?(err?: object): any;
chokidarWatchOptions?: Object;
}
export type res = object | void
declare function syncDirectory(srcDir: string, targetDir: string, options?: options): res
declare function asyncSyncDirectory(srcDir: string, targetDir: string, options?: options): Promise<res>
export default syncDirectory
export const sync: typeof syncDirectory
export const async: typeof asyncSyncDirectory