Plants vs. Zombies: Replanted - v1.0.3
    Preparing search index...

    Interface Resolver<R>

    interface Resolver<R> {
        promise: Bluebird<R>;
        callback(err: any, value: R, ...values: R[]): void;
        reject(reason: any): void;
        resolve(value: R): void;
        resolve(): void;
    }

    Type Parameters

    • R
    Index

    Properties

    Methods

    Properties

    promise: Bluebird<R>

    Returns a reference to the controlled promise that can be passed to clients.

    Methods

    • Gives you a callback representation of the PromiseResolver. Note that this is not a method but a property. The callback accepts error object in first argument and success values on the 2nd parameter and the rest, I.E. node js conventions.

      If the the callback is called with multiple success values, the resolver fulfills its promise with an array of the values.

      Parameters

      • err: any
      • value: R
      • ...values: R[]

      Returns void

    • Reject the underlying promise with reason as the rejection reason.

      Parameters

      • reason: any

      Returns void

    • Resolve the underlying promise with value as the resolution value. If value is a thenable or a promise, the underlying promise will assume its state.

      Parameters

      • value: R

      Returns void

    • Returns void