1 | # Installation
|
2 | > `npm install --save @types/write-file-atomic`
|
3 |
|
4 | # Summary
|
5 | This package contains type definitions for write-file-atomic (https://github.com/npm/write-file-atomic).
|
6 |
|
7 | # Details
|
8 | Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/write-file-atomic.
|
9 | ## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/write-file-atomic/index.d.ts)
|
10 | ````ts
|
11 | // Type definitions for write-file-atomic 3.0
|
12 | // Project: https://github.com/npm/write-file-atomic
|
13 | // Definitions by: BendingBender <https://github.com/BendingBender>
|
14 | // Jay Rylan <https://github.com/jayrylan>
|
15 | // Piotr Błażejewicz <https://github.com/peterblazejewicz>
|
16 | // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
17 |
|
18 | /// <reference types="node" />
|
19 |
|
20 | export = writeFile;
|
21 |
|
22 | declare function writeFile(filename: string, data: string | Buffer, options: writeFile.Options | BufferEncoding, callback: (error?: Error) => void): void;
|
23 | declare function writeFile(filename: string, data: string | Buffer, callback: (error?: Error) => void): void;
|
24 | declare function writeFile(filename: string, data: string | Buffer, options?: writeFile.Options | BufferEncoding): Promise<void>;
|
25 |
|
26 | declare namespace writeFile {
|
27 | function sync(filename: string, data: string | Buffer, options?: Options | BufferEncoding): void;
|
28 |
|
29 | interface Options {
|
30 | chown?: {
|
31 | uid: number;
|
32 | gid: number;
|
33 | } | undefined;
|
34 | /**
|
35 | * @default 'utf8'
|
36 | */
|
37 | encoding?: BufferEncoding | undefined;
|
38 | fsync?: boolean | undefined;
|
39 | mode?: number | undefined;
|
40 | }
|
41 | }
|
42 |
|
43 | ````
|
44 |
|
45 | ### Additional Details
|
46 | * Last updated: Fri, 02 Jul 2021 18:06:03 GMT
|
47 | * Dependencies: [@types/node](https://npmjs.com/package/@types/node)
|
48 | * Global values: none
|
49 |
|
50 | # Credits
|
51 | These definitions were written by [BendingBender](https://github.com/BendingBender), [Jay Rylan](https://github.com/jayrylan), and [Piotr Błażejewicz](https://github.com/peterblazejewicz).
|
52 |
|
\ | No newline at end of file |