You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import { Octokit } from "@octokit/rest";
import { throttling } from "@octokit/plugin-throttling";
const MyOctokit = Octokit.plugin(throttling);
and I get the type error
Argument of type 'typeof throttling' is not assignable to parameter of type 'OctokitPlugin'.
Types of parameters 'octokit' and 'octokit' are incompatible.
Type 'import("/Users/noqcks/go/src/github.com/xeol-io/swe-bump-bench/node_modules/.pnpm/@octokit+core@5.1.0/node_modules/@octokit/core/dist-types/index").Octokit' is not assignable to type 'import("/Users/noqcks/go/src/github.com/xeol-io/swe-bump-bench/node_modules/.pnpm/@octokit+core@6.1.1/node_modules/@octokit/core/dist-types/index").Octokit'.
The types of 'hook.before' are incompatible between these types.
Type '<Name extends keyof Hooks>(name: Name, beforeHook: BeforeHook<GetType<Hooks[Name], "Options", "O">>) => void' is not assignable to type '<Name extends keyof Hooks>(name: Name, beforeHook: BeforeHook<GetType<Hooks[Name], "Options">>) => void'.
Types of parameters 'beforeHook' and 'beforeHook' are incompatible.
Types of parameters 'options' and 'options' are incompatible.
Type 'GetType<Hooks[Name], "Options", "O">' is not assignable to type 'GetType<Hooks[Name], "Options">'.
Type 'Hooks[Name][keyof Hooks[Name] & "Options"] | ("O" extends keyof Hooks[Name] ? Hooks[Name][keyof Hooks[Name] & "O"] : any)' is not assignable to type 'GetType<Hooks[Name], "Options">'.
Type 'Hooks[Name][keyof Hooks[Name] & "Options"]' is not assignable to type 'GetType<Hooks[Name], "Options">'.
Type 'Hooks[Name]["Options"]' is not assignable to type 'GetType<Hooks[Name], "Options">'
it looks @octokit/plugin-throttling and @octokit/rest are using different versions of @octokit/core -- 5.1.0 and 6.1.1 respectively.
Activity
wolfy1339 commentedon Apr 4, 2024
Well they aren't compatible because of ESM anyways.
You should always check the release notes
wolfy1339 commentedon Apr 4, 2024
@octokit/restis currently blocked by octokit/rest.js#413wolfy1339 commentedon Apr 5, 2024
The dependency on
@octokit/coreis defined in thepeerDependenciesIt is documented