Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add pagination global types #1443

Merged
merged 4 commits into from
Aug 19, 2020
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 16 additions & 0 deletions packages/types/src/pagination.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { Client } from "@aws-sdk/types";

/**
* Expected type definition of a paginator.
*/
export type Paginator<T> = AsyncGenerator<T, T, unknown>;

/**
* Expected paginator configuration passed to an operation. Services will extend
* this interface definition and may type client further.
*/
export interface PaginationConfiguration {
client: Client<any, any, any>;
pageSize?: number;
startingToken?: string;
}