UNPKG

819 BTypeScriptView Raw
1// Type definitions for graceful-fs 4.1
2// Project: https://github.com/isaacs/node-graceful-fs
3// Definitions by: Bart van der Schoor <https://github.com/Bartvds>
4// BendingBender <https://github.com/BendingBender>
5// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
6
7/// <reference types="node" />
8
9export * from 'fs';
10
11/**
12 * Use this method to patch the global fs module (or any other fs-like module).
13 * NOTE: This should only ever be done at the top-level application layer, in order to delay on
14 * EMFILE errors from any fs-using dependencies. You should **not** do this in a library, because
15 * it can cause unexpected delays in other parts of the program.
16 * @param fsModule The reference to the fs module or an fs-like module.
17 */
18export function gracefulify<T>(fsModule: T): T;