1 |
|
2 |
|
3 | import { EventEmitter } from "events";
|
4 | import * as stream from "stream";
|
5 |
|
6 | export interface SyncOptions {
|
7 |
|
8 | clean?: boolean | undefined;
|
9 |
|
10 | dereference?: boolean | undefined;
|
11 |
|
12 | includeEmptyDirs?: boolean | undefined;
|
13 |
|
14 | preserve?: boolean | undefined;
|
15 |
|
16 | update?: boolean | undefined;
|
17 | }
|
18 |
|
19 | export interface AsyncOptions extends SyncOptions {
|
20 |
|
21 | transform?(filepath: string): stream.Transform[];
|
22 | }
|
23 |
|
24 | export interface WatchOptions extends AsyncOptions, SyncOptions {
|
25 |
|
26 | initialCopy?: boolean | undefined;
|
27 | }
|
28 |
|
29 | export class Watcher extends EventEmitter {
|
30 | constructor(options: WatchOptions);
|
31 | open(): void;
|
32 | close(): void;
|
33 | }
|
34 |
|
35 | export function copy(
|
36 | source: string,
|
37 | dest: string,
|
38 | options?: AsyncOptions,
|
39 | callback?: (error: Error | null) => void,
|
40 | ): void;
|
41 | export function copy(source: string, dest: string, callback?: (error: Error | null) => void): void;
|
42 |
|
43 | export function copySync(source: string, dest: string, options?: SyncOptions): void;
|
44 |
|
45 | export function watch(source: string, dest: string, options?: WatchOptions): Watcher;
|