@pengzhanbo/utils - v3.9.0
    Preparing search index...

    Interface Deferred<T>

    Deferred value type

    延迟值类型

    interface Deferred<T> {
        promise: Promise<T>;
        reject: (reason?: unknown) => void;
        resolve: (value: T | PromiseLike<T>) => void;
    }

    Type Parameters

    • T
    Index
    promise: Promise<T>

    The promise that will resolve or reject.

    将会 resolve 或 reject 的 Promise。

    reject: (reason?: unknown) => void

    Reject the promise with a reason.

    使用一个原因 reject 该 Promise。

    resolve: (value: T | PromiseLike<T>) => void

    Resolve the promise with a value.

    使用一个值 resolve 该 Promise。