@types/random-access-file
TypeScript icon, indicating that this package has built-in type declarations

4.0.0 • Public • Published

Installation

npm install --save @types/random-access-file

Summary

This package contains type definitions for random-access-file (https://github.com/random-access-storage/random-access-file).

Details

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

import RandomAccessStorage = require("random-access-storage");

declare class Pool {
    constructor(maxSize: number);
}

declare class RandomAccessFile extends RandomAccessStorage {
    constructor(
        filename: string,
        opts?: Readonly<{
            /** truncate the file before reading / writing */
            truncate?: boolean;
            /** truncate the file to this size first */
            size?: number;
            /** should the file be opened as readable? */
            readable?: boolean;
            /** should the file be opened as writable? */
            writable?: boolean;
            /** lock the file */
            lock?: boolean;
            /** mark the file as sparse */
            sparse?: boolean;
            directory?: string;
            pool?: Pool;
        }>,
    );

    static createPool(maxSize: number): Pool;
}

export = RandomAccessFile;

Additional Details

Credits

These definitions were written by Evan Hahn.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/random-access-file

Weekly Downloads

163

Version

4.0.0

License

MIT

Unpacked Size

4.54 kB

Total Files

5

Last publish

Collaborators

  • types