JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 65985
  • Score
    100M100P100Q157768F
  • License MIT

TypeScript definitions for write-file-atomic

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@types/write-file-atomic) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    Installation

    npm install --save @types/write-file-atomic

    Summary

    This package contains type definitions for write-file-atomic (https://github.com/npm/write-file-atomic).

    Details

    Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/write-file-atomic.

    index.d.ts

    /// <reference types="node" />
    
    export = writeFile;
    
    declare function writeFile(
        filename: string,
        data: string | Buffer,
        options: writeFile.Options | BufferEncoding,
        callback: (error?: Error) => void,
    ): void;
    declare function writeFile(filename: string, data: string | Buffer, callback: (error?: Error) => void): void;
    declare function writeFile(
        filename: string,
        data: string | Buffer,
        options?: writeFile.Options | BufferEncoding,
    ): Promise<void>;
    
    declare namespace writeFile {
        function sync(filename: string, data: string | Buffer, options?: Options | BufferEncoding): void;
    
        interface Options {
            chown?:
                | {
                    uid: number;
                    gid: number;
                }
                | undefined;
            /**
             * @default 'utf8'
             */
            encoding?: BufferEncoding | undefined;
            fsync?: boolean | undefined;
            mode?: number | undefined;
            tmpfileCreated?: ((tmpfile: string) => void) | undefined;
        }
    }
    

    Additional Details

    • Last updated: Tue, 07 Nov 2023 15:11:36 GMT
    • Dependencies: @types/node

    Credits

    These definitions were written by BendingBender, and Piotr Błażejewicz.