UNPKG

1.14 kBTypeScriptView Raw
1declare namespace copyfiles {
2 interface Options {
3 /** include files & directories beginning with a dot (.) */
4 all?: boolean | undefined;
5 /** throw error if nothing is copied */
6 error?: boolean | undefined;
7 /** pattern or glob to exclude */
8 exclude?: string | readonly string[] | undefined;
9 /** flatten the output */
10 flat?: boolean | undefined;
11 /**
12 * follow symbolink links
13 * @default false
14 */
15 follow?: boolean | undefined;
16 /** do not overwrite destination files if they exist */
17 soft?: boolean | undefined;
18 /**
19 * slice a path off the bottom of the paths
20 * @default 0
21 */
22 up?: number | true | undefined;
23 /** print more information to console */
24 verbose?: boolean | undefined;
25 }
26
27 type Callback = (error?: Error) => void;
28}
29
30declare function copyfiles(paths: string[], options: copyfiles.Options | number, callback: copyfiles.Callback): void;
31declare function copyfiles(paths: string[], callback: copyfiles.Callback): void;
32
33export = copyfiles;