From d12f9ba008f694fc1dd4e7618de7b5e8b420f361 Mon Sep 17 00:00:00 2001 From: Alexander Forsyth Date: Wed, 19 Aug 2020 12:49:58 -0400 Subject: [PATCH] feat: add pagination global types (#1443) * feat: add pagination global types --- packages/types/src/pagination.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 packages/types/src/pagination.ts diff --git a/packages/types/src/pagination.ts b/packages/types/src/pagination.ts new file mode 100644 index 000000000000..82a912ac5763 --- /dev/null +++ b/packages/types/src/pagination.ts @@ -0,0 +1,16 @@ +import { Client } from "@aws-sdk/types"; + +/** + * Expected type definition of a paginator. + */ +export type Paginator = AsyncGenerator; + +/** + * Expected paginator configuration passed to an operation. Services will extend + * this interface definition and may type client further. + */ +export interface PaginationConfiguration { + client: Client; + pageSize?: number; + startingToken?: string; +}