Mayson Monorepo Documentation
    Preparing search index...

    Interface ApiListPromise<T>

    interface ApiListPromise<T> {
        autoPagingEach(
            handler: (item: T) => boolean | void | Promise<boolean | void>,
            onDone?: (err: any) => void,
        ): Promise<void>;
        autoPagingToArray(
            opts: { limit: number },
            onDone?: (err: any) => void,
        ): Promise<T[]>;
        "[toStringTag]": string;
        next(...__namedParameters: [] | [any]): Promise<IteratorResult<T, any>>;
        return?(value?: any): Promise<IteratorResult<T, any>>;
        throw?(e?: any): Promise<IteratorResult<T, any>>;
        "[asyncIterator]"(): AsyncIterableIterator<T, any, any>;
        finally(onfinally?: () => void): Promise<Response<ApiList<T>>>;
        then<TResult1 = Response<ApiList<T>>, TResult2 = never>(
            onfulfilled?: (value: Response) => TResult1 | PromiseLike<TResult1>,
            onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>,
        ): Promise<TResult1 | TResult2>;
        catch<TResult = never>(
            onrejected?: (reason: any) => TResult | PromiseLike<TResult>,
        ): Promise<Response<ApiList<T>> | TResult>;
    }

    Type Parameters

    • T

    Hierarchy

    Index

    Properties

    "[toStringTag]": string

    Methods

    • Parameters

      • handler: (item: T) => boolean | void | Promise<boolean | void>
      • OptionalonDone: (err: any) => void

      Returns Promise<void>

    • Parameters

      • opts: { limit: number }
      • OptionalonDone: (err: any) => void

      Returns Promise<T[]>

    • Parameters

      • ...__namedParameters: [] | [any]

      Returns Promise<IteratorResult<T, any>>

    • Parameters

      • Optionalvalue: any

      Returns Promise<IteratorResult<T, any>>

    • Parameters

      • Optionale: any

      Returns Promise<IteratorResult<T, any>>

    • Returns AsyncIterableIterator<T, any, any>

    • 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<Response<ApiList<T>>>

      A Promise for the completion of the callback.

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

      Type Parameters

      Parameters

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

      • TResult = never

      Parameters

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

        The callback to execute when the Promise is rejected.

      Returns Promise<Response<ApiList<T>> | TResult>

      A Promise for the completion of the callback.