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