WXL
4 天以前 3bd962a6d7f61239c020e2dbbeb7341e5b842dd1
node_modules/@types/node/fs/promises.d.ts
@@ -1,13 +1,3 @@
/**
 * The `fs/promises` API provides asynchronous file system methods that return
 * promises.
 *
 * The promise APIs use the underlying Node.js threadpool to perform file
 * system operations off the event loop thread. These operations are not
 * synchronized or threadsafe. Care must be taken when performing multiple
 * concurrent modifications on the same file or data corruption may occur.
 * @since v10.0.0
 */
declare module "node:fs/promises" {
    import { NonSharedBuffer } from "node:buffer";
    import { Abortable } from "node:events";
@@ -20,7 +10,6 @@
        CopyOptions,
        Dir,
        Dirent,
        DisposableTempDir,
        EncodingOption,
        GlobOptions,
        GlobOptionsWithFileTypes,
@@ -980,6 +969,20 @@
        prefix: string,
        options?: ObjectEncodingOptions | BufferEncoding | null,
    ): Promise<string | NonSharedBuffer>;
    interface DisposableTempDir extends AsyncDisposable {
        /**
         * The path of the created directory.
         */
        path: string;
        /**
         * A function which removes the created directory.
         */
        remove(): Promise<void>;
        /**
         * The same as `remove`.
         */
        [Symbol.asyncDispose](): Promise<void>;
    }
    /**
     * The resulting Promise holds an async-disposable object whose `path` property
     * holds the created directory path. When the object is disposed, the directory