Skip to content

Commit

Permalink
fix(typescript): add done callback to Paginate interface
Browse files Browse the repository at this point in the history
  • Loading branch information
BinaryMuse authored and gr2m committed Oct 30, 2019
1 parent 56415e9 commit 3053278
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/github/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export interface OctokitError extends Error {
interface Paginate extends Octokit.Paginate {
(
responsePromise: Promise<Octokit.AnyResponse>,
callback?: (response: Octokit.AnyResponse) => any
callback?: (response: Octokit.AnyResponse, done: () => void) => any
): Promise<any[]>
}

Expand Down
2 changes: 1 addition & 1 deletion src/github/pagination.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export function addPagination (octokit: Octokit) {
)
}

const defaultCallback = (response: Octokit.AnyResponse, done?: () => void) => response
const defaultCallback = (response: Octokit.AnyResponse, done: () => void) => response

async function paginate (octokit: Octokit, octokitPaginate: Octokit.Paginate, ...args: any[]) {
// Until we fully deprecate the old paginate method, we need to check if the
Expand Down

0 comments on commit 3053278

Please sign in to comment.