-
Notifications
You must be signed in to change notification settings - Fork 576
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(types): update types to include pagination type. (#1451)
* feat: add pagination global types
- Loading branch information
1 parent
8a0febd
commit 8e34453
Showing
2 changed files
with
17 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { Client } from "./client"; | ||
|
||
/** | ||
* 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; | ||
} |