1 | // Type definitions for copyfiles 2.4
|
2 | // Project: https://github.com/calvinmetcalf/copyfiles#readme
|
3 | // Definitions by: Florian Keller <https://github.com/ffflorian>
|
4 | // Piotr Błażejewicz <https://github.com/peterblazejewicz>
|
5 | // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
6 |
|
7 | declare namespace copyfiles {
|
8 | interface Options {
|
9 | /** include files & directories beginning with a dot (.) */
|
10 | all?: boolean | undefined;
|
11 | /** throw error if nothing is copied */
|
12 | error?: boolean | undefined;
|
13 | /** pattern or glob to exclude */
|
14 | exclude?: string | ReadonlyArray<string> | undefined;
|
15 | /** flatten the output */
|
16 | flat?: boolean | undefined;
|
17 | /**
|
18 | * follow symbolink links
|
19 | * @default false
|
20 | */
|
21 | follow?: boolean | undefined;
|
22 | /** do not overwrite destination files if they exist */
|
23 | soft?: boolean | undefined;
|
24 | /**
|
25 | * slice a path off the bottom of the paths
|
26 | * @default 0
|
27 | */
|
28 | up?: number | true | undefined;
|
29 | /** print more information to console */
|
30 | verbose?: boolean | undefined;
|
31 | }
|
32 |
|
33 | type Callback = (error?: Error) => void;
|
34 | }
|
35 |
|
36 | declare function copyfiles(paths: string[], options: copyfiles.Options | number, callback: copyfiles.Callback): void;
|
37 | declare function copyfiles(paths: string[], callback: copyfiles.Callback): void;
|
38 |
|
39 | export = copyfiles;
|