1 |
|
2 |
|
3 | export = writeFile;
|
4 |
|
5 | declare function writeFile(
|
6 | filename: string,
|
7 | data: string | Buffer,
|
8 | options: writeFile.Options | BufferEncoding,
|
9 | callback: (error?: Error) => void,
|
10 | ): void;
|
11 | declare function writeFile(filename: string, data: string | Buffer, callback: (error?: Error) => void): void;
|
12 | declare function writeFile(
|
13 | filename: string,
|
14 | data: string | Buffer,
|
15 | options?: writeFile.Options | BufferEncoding,
|
16 | ): Promise<void>;
|
17 |
|
18 | declare namespace writeFile {
|
19 | function sync(filename: string, data: string | Buffer, options?: Options | BufferEncoding): void;
|
20 |
|
21 | interface Options {
|
22 | chown?:
|
23 | | {
|
24 | uid: number;
|
25 | gid: number;
|
26 | }
|
27 | | undefined;
|
28 | |
29 |
|
30 |
|
31 | encoding?: BufferEncoding | undefined;
|
32 | fsync?: boolean | undefined;
|
33 | mode?: number | undefined;
|
34 | tmpfileCreated?: ((tmpfile: string) => void) | undefined;
|
35 | }
|
36 | }
|
37 |
|
\ | No newline at end of file |