Skip to content

Commit

Permalink
feat: export types for paginated calls (#657)
Browse files Browse the repository at this point in the history
* fix: add license to protos/protos.js

* feat: export types for paginated calls

* revert extra stuff
  • Loading branch information
alexander-fenster authored Nov 14, 2019
1 parent e7071d1 commit b4007c7
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,3 +141,26 @@ export interface LROperation<ResultType, MetadataType>
[ResultType, MetadataType, operationProtos.google.longrunning.Operation]
>;
}

export interface PaginationCallback<
RequestObject,
ResponseObject,
ResponseType
> {
(
err: Error | null,
values?: ResponseType[],
nextPageRequest?: RequestObject,
rawResponse?: ResponseObject
): void;
}

export interface PaginationResponse<
RequestObject,
ResponseObject,
ResponseType
> {
values?: ResponseType[];
nextPageRequest?: RequestObject;
rawResponse?: ResponseObject;
}

0 comments on commit b4007c7

Please sign in to comment.