strongbus - v3.1.0
    Preparing search index...

    Interface Scanner<TResult>

    interface Scanner<TResult> {
        get settled(): boolean;
        then<TResult1 = TResult, TResult2 = never>(
            onfulfilled?: (value: TResult) => TResult1 | PromiseLike<TResult1>,
            onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>,
        ): Promise<TResult1 | TResult2>;
        catch<TResult1 = never>(
            onrejected?: (reason: any) => TResult1 | PromiseLike<TResult1>,
        ): Promise<TResult1>;
        finally(onfinally?: () => void): Promise<TResult>;
        cancel(reason?: string | Error): boolean;
        scan<TEventMap extends object>(
            scannable: Scannable<TEventMap>,
            listenable: Listenable<keyof TEventMap>,
            options?: SubscribeOptions,
        ): this;
        "[toStringTag]": string;
    }

    Type Parameters

    • TResult

      Scanner is resolved with value of this type

    Implements

    Index
    "[toStringTag]": string = 'Promise'
    • get settled(): boolean

      Has the scanner resolved, rejected, or been canceled. A scanner that settles during eager evaluation never subscribes to any events.

      Returns boolean

    • Attaches callbacks for the resolution and/or rejection of the Promise.

      Type Parameters

      • TResult1 = TResult
      • TResult2 = never

      Parameters

      • Optionalonfulfilled: (value: TResult) => TResult1 | PromiseLike<TResult1>

        The callback to execute when the Promise is resolved.

      • Optionalonrejected: (reason: any) => TResult2 | PromiseLike<TResult2>

        The callback to execute when the Promise is rejected.

      Returns Promise<TResult1 | TResult2>

      A Promise for the completion of which ever callback is executed.

    • Attaches a callback for only the rejection of the Promise.

      Type Parameters

      • TResult1 = never

      Parameters

      • Optionalonrejected: (reason: any) => TResult1 | PromiseLike<TResult1>

        The callback to execute when the Promise is rejected.

      Returns Promise<TResult1>

      A Promise for the completion of the callback.

    • Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The resolved value cannot be modified from the callback.

      Parameters

      • Optionalonfinally: () => void

        The callback to execute when the Promise is settled (fulfilled or rejected).

      Returns Promise<TResult>

      A Promise for the completion of the callback.

    • Parameters

      • Optionalreason: string | Error

      Returns boolean