UNPKG

854 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// Minimum TypeScript Version: 3.9
7
8/// <reference types="node" />
9
10export * from 'fs';
11
12/**
13 * Use this method to patch the global fs module (or any other fs-like module).
14 * NOTE: This should only ever be done at the top-level application layer, in order to delay on
15 * EMFILE errors from any fs-using dependencies. You should **not** do this in a library, because
16 * it can cause unexpected delays in other parts of the program.
17 * @param fsModule The reference to the fs module or an fs-like module.
18 */
19export function gracefulify<T>(fsModule: T): T;