Skip to content

Commit

Permalink
feat: add pagination global types (#1443)
Browse files Browse the repository at this point in the history
* feat: add pagination global types
  • Loading branch information
alexforsyth committed Aug 19, 2020
1 parent 5478012 commit d12f9ba
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions packages/types/src/pagination.ts
@@ -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;
}

0 comments on commit d12f9ba

Please sign in to comment.