Skip to content

[BUG]: dist-types out of sync with changes in @octokit/[email protected] #2896

@gbhmt

Description

@gbhmt

What happened?

The latest release of @octokit/oauth-app (8.0.2) updates the interface for GetUserOctokitWithStateInterface to have 2 required type arguments. The generated types in the current release of octokit were generated off of @octokit/[email protected], causing the package to not compile in Typescript:

// index.ts
import { App } from 'octokit';

const appId = 'myAppId';
const privateKey = 'myPrivateKey';
const myApp = new App({ appId, privateKey });

// tsconfig.json
{
  "compilerOptions": {
    "target": "esnext",
    "module": "nodenext",
    "moduleResolution": "nodenext",
    "strict": true
  }
}

Stackblitz reproduction (runkit.com is currently timing out): https://stackblitz.com/edit/node-i7r2pkkz?file=index.ts

  • compile with npx tsc --noEmit

Versions

Octokit.js 5.0.3, TypeScript 5.9.3, NodeJS 20.19.1

Relevant log output

❯ npx tsc --noEmit
node_modules/octokit/dist-types/app.d.ts:79:21 - error TS2314: Generic type 'GetUserOctokitWithStateInterface<TClientType, TOctokitInstance>' requires 2 type argument(s).

79     getUserOctokit: import("@octokit/oauth-app").GetUserOctokitWithStateInterface<"oauth-app">;
                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Found 1 error in node_modules/octokit/dist-types/app.d.ts:79

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: TriageThis is being looked at and prioritizedType: BugSomething isn't working as documented

    Type

    No type

    Projects

    Status

    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions