UNPKG

743 BTypeScriptView Raw
1import { Client } from "./client";
2/**
3 * @public
4 *
5 * Expected type definition of a paginator.
6 */
7export type Paginator<T> = AsyncGenerator<T, T, unknown>;
8/**
9 * @public
10 *
11 * Expected paginator configuration passed to an operation. Services will extend
12 * this interface definition and may type client further.
13 */
14export interface PaginationConfiguration {
15 client: Client<any, any, any>;
16 pageSize?: number;
17 startingToken?: any;
18 /**
19 * For some APIs, such as CloudWatchLogs events, the next page token will always
20 * be present.
21 *
22 * When true, this config field will have the paginator stop when the token doesn't change
23 * instead of when it is not present.
24 */
25 stopOnSameToken?: boolean;
26}