diff --git a/src/index.ts b/src/index.ts index ef9cb65c7..34669af5f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -5,6 +5,10 @@ import { VERSION } from "./version.js"; import type { Api } from "./types.js"; import { endpointsToMethods } from "./endpoints-to-methods.js"; +// Export the type for downstream users in order to fix a TypeScript error +// The inferred type of 'Octokit' cannot be named without a reference to '../node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/types.js'. This is likely not portable. A type annotation is necessary. +export type { Api }; + export function restEndpointMethods(octokit: Octokit): Api { const api = endpointsToMethods(octokit); return {