lib-jitsi-meet
    Preparing search index...

    Promise-like object which can be passed around for resolving it later. It implements the "thenable" interface, so it can be used wherever a Promise could be used.

    In addition a "reject on timeout" functionality is provided.

    Type Parameters

    • T = any
    Index

    Constructors

    Properties

    catch: <TResult = never>(
        onrejected?: (reason: any) => TResult | PromiseLike<TResult>,
    ) => Promise<T | TResult>

    Type declaration

      • <TResult = never>(
            onrejected?: (reason: any) => TResult | PromiseLike<TResult>,
        ): Promise<T | TResult>
      • Attaches a callback for only the rejection of the Promise.

        Type Parameters

        • TResult = never

        Parameters

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

          The callback to execute when the Promise is rejected.

        Returns Promise<T | TResult>

        A Promise for the completion of the callback.

    promise: Promise<T>
    reject: (reason?: any) => void
    resolve: (value: T | PromiseLike<T>) => void
    then: <TResult1 = T, TResult2 = never>(
        onfulfilled?: (value: T) => TResult1 | PromiseLike<TResult1>,
        onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>,
    ) => Promise<TResult1 | TResult2>

    Type declaration

      • <TResult1 = T, TResult2 = never>(
            onfulfilled?: (value: T) => TResult1 | PromiseLike<TResult1>,
            onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>,
        ): Promise<TResult1 | TResult2>
      • Attaches callbacks for the resolution and/or rejection of the Promise.

        Type Parameters

        • TResult1 = T
        • TResult2 = never

        Parameters

        • Optionalonfulfilled: (value: T) => 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.

    Methods

    • Rejects the promise after the given timeout.

      Parameters

      • ms: number

      Returns void