Skip to content

Commit d12f9ba

Browse files
authored
feat: add pagination global types (#1443)
* feat: add pagination global types
1 parent 5478012 commit d12f9ba

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

Diff for: packages/types/src/pagination.ts

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { Client } from "@aws-sdk/types";
2+
3+
/**
4+
* Expected type definition of a paginator.
5+
*/
6+
export type Paginator<T> = AsyncGenerator<T, T, unknown>;
7+
8+
/**
9+
* Expected paginator configuration passed to an operation. Services will extend
10+
* this interface definition and may type client further.
11+
*/
12+
export interface PaginationConfiguration {
13+
client: Client<any, any, any>;
14+
pageSize?: number;
15+
startingToken?: string;
16+
}

0 commit comments

Comments
 (0)