Skip to content

Commit 9841aaf

Browse files
committed
fix: add return type annotation
1 parent 1f19786 commit 9841aaf

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/index.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,15 @@ import { createIterator } from "./iterator.js";
33
import { createPaginate } from "./paginate.js";
44
export type { PageInfoForward, PageInfoBackward } from "./page-info.js";
55

6-
export function paginateGraphQL(octokit: Octokit) {
7-
octokit.graphql;
6+
type paginateGraphQLInterface = {
7+
graphql: Octokit["graphql"] & {
8+
paginate: ReturnType<typeof createPaginate> & {
9+
iterator: ReturnType<typeof createIterator>;
10+
};
11+
};
12+
};
13+
14+
export function paginateGraphQL(octokit: Octokit): paginateGraphQLInterface {
815
return {
916
graphql: Object.assign(octokit.graphql, {
1017
paginate: Object.assign(createPaginate(octokit), {

0 commit comments

Comments
 (0)