Skip to content

Commit a789a6f

Browse files
authored
fix(types): export paginateGraphQLInterface (#200)
This resolves issues in consumers of this package getting errors from TypeScript ``` The inferred type of 'Octokit' cannot be named without a reference to '@octokit/core/node_modules/@octokit/graphql/types'. This is likely not portable. A type annotation is necessary. ```
1 parent 193a9f1 commit a789a6f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ import { createPaginate } from "./paginate.js";
44
export type { PageInfoForward, PageInfoBackward } from "./page-info.js";
55
export { VERSION } from "./version.js";
66

7-
type paginateGraphQLInterface = {
7+
// Export the paginateGraphQLInterface type in order to fix TypeScript errors in downstream projects
8+
// The inferred type of 'Octokit' cannot be named without a reference to '@octokit/core/node_modules/@octokit/graphql/types'. This is likely not portable. A type annotation is necessary.
9+
export type paginateGraphQLInterface = {
810
graphql: Octokit["graphql"] & {
911
paginate: ReturnType<typeof createPaginate> & {
1012
iterator: ReturnType<typeof createIterator>;

0 commit comments

Comments
 (0)