Skip to content

Commit

Permalink
fix: add return type annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfy1339 committed Mar 4, 2024
1 parent 1f19786 commit 9841aaf
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,15 @@ import { createIterator } from "./iterator.js";
import { createPaginate } from "./paginate.js";
export type { PageInfoForward, PageInfoBackward } from "./page-info.js";

export function paginateGraphQL(octokit: Octokit) {
octokit.graphql;
type paginateGraphQLInterface = {
graphql: Octokit["graphql"] & {
paginate: ReturnType<typeof createPaginate> & {
iterator: ReturnType<typeof createIterator>;
};
};
};

export function paginateGraphQL(octokit: Octokit): paginateGraphQLInterface {
return {
graphql: Object.assign(octokit.graphql, {
paginate: Object.assign(createPaginate(octokit), {
Expand Down

0 comments on commit 9841aaf

Please sign in to comment.