Skip to main content

@dialstack/sdk-dev / webrtc/src / PaginatedList

Interface: PaginatedList<P>

Defined in: sdk/webrtc/src/pagination.ts:28

A promise of the first page, augmented with auto-pagination iterators that lazily fetch subsequent pages by following next_page_url.

Extends

  • Promise<P>

Type Parameters

P

P extends Page<unknown>

Properties

[toStringTag]

TypeScript
readonly [toStringTag]: string;

Defined in: docs/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts:174

Inherited from

TypeScript
Promise.[toStringTag]

Methods

autoPagingEach()

TypeScript
autoPagingEach(): AsyncIterableIterator<PageItem<P>>;

Defined in: sdk/webrtc/src/pagination.ts:29

Returns

AsyncIterableIterator<PageItem<P>>


autoPagingToArray()

TypeScript
autoPagingToArray(options?): Promise<PageItem<P>[]>;

Defined in: sdk/webrtc/src/pagination.ts:30

Parameters

options?
limit?

number

Returns

Promise<PageItem<P>[]>


catch()

TypeScript
catch<TResult>(onrejected?): Promise<P | TResult>;

Defined in: docs/node_modules/typescript/lib/lib.es5.d.ts:1562

Attaches a callback for only the rejection of the Promise.

Type Parameters

TResult

TResult = never

Parameters

onrejected?

((reason) => TResult | PromiseLike<TResult>) | null

The callback to execute when the Promise is rejected.

Returns

Promise<P | TResult>

A Promise for the completion of the callback.

Inherited from

TypeScript
Promise.catch

finally()

TypeScript
finally(onfinally?): Promise<P>;

Defined in: docs/node_modules/typescript/lib/lib.es2018.promise.d.ts:27

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

Parameters

onfinally?

(() => void) | null

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

Returns

Promise<P>

A Promise for the completion of the callback.

Inherited from

TypeScript
Promise.finally

then()

TypeScript
then<TResult1, TResult2>(onfulfilled?, onrejected?): Promise<TResult1 | TResult2>;

Defined in: docs/node_modules/typescript/lib/lib.es5.d.ts:1555

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

Type Parameters

TResult1

TResult1 = P

TResult2

TResult2 = never

Parameters

onfulfilled?

((value) => TResult1 | PromiseLike<TResult1>) | null

The callback to execute when the Promise is resolved.

onrejected?

((reason) => TResult2 | PromiseLike<TResult2>) | null

The callback to execute when the Promise is rejected.

Returns

Promise<TResult1 | TResult2>

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

Inherited from

TypeScript
Promise.then