-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Labels
Status: TriageThis is being looked at and prioritizedThis is being looked at and prioritizedType: BugSomething isn't working as documentedSomething isn't working as documented
Description
What happened?
The upgrade to v15 was completed here in core: octokit/core.js#748
However it is still pending here (and almost everywhere else @octokit/types is a dependency): #691
This code:
import { Octokit } from "@octokit/rest";
import { throttling } from '@octokit/plugin-throttling';
const CustomOctokit = Octokit.plugin(throttling);
const octokit = new CustomOctokit({});
async function foo() {
const issues = await octokit.paginate(
octokit.teams.listMembersInOrg,
{
org: 'blah',
team_slug: 'blah',
per_page: 100
}
);
}
Results in this error:
> tsc --project tsconfig.json
src/index.ts:9:9 - error TS2769: No overload matches this call.
The last overload gave the following error.
Argument of type '{ (params?: (RequestParameters & { role?: "all" | "member" | "maintainer" | undefined; per_page?: number | undefined; page?: number | undefined; org: string; team_slug: string; }) | undefined): Promise<...>; defaults: <O extends RequestParameters = RequestParameters>(newDefaults: O) => RequestInterface<...>; endpoin...' is not assignable to parameter of type 'RequestInterface<object>'.
The types returned by 'defaults(...).defaults(...)(...)' are incompatible between these types.
Type 'Promise<import("/Users/danielcox/work/octokit-bug/node_modules/@octokit/types/dist-types/OctokitResponse").OctokitResponse<any, number>>' is not assignable to type 'Promise<import("/Users/danielcox/work/octokit-bug/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/OctokitResponse").OctokitResponse<any, number>>'.
Property 'retryCount' is missing in type 'import("/Users/danielcox/work/octokit-bug/node_modules/@octokit/types/dist-types/OctokitResponse").OctokitResponse<any, number>' but required in type 'import("/Users/danielcox/work/octokit-bug/node_modules/@octokit/request/node_modules/@octokit/types/dist-types/OctokitResponse").OctokitResponse<any, number>'.
9 octokit.teams.listMembersInOrg,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/@octokit/plugin-throttling/dist-types/index.d.ts:15:9
15 retryCount: number;
~~~~~~~~~~
'retryCount' is declared here.
node_modules/@octokit/plugin-paginate-rest/dist-types/types.d.ts:98:5
98 <R extends OctokitTypes.RequestInterface>(request: R, parameters?: Parameters<R>[0]): Promise<NormalizeResponse<OctokitTypes.GetResponseTypeFromEndpointMethod<R>>["data"]>;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The last overload is declared here.
Found 1 error in src/index.ts:9
Versions
...
"dependencies": {
"@octokit/plugin-throttling": "^11.0.1",
"@octokit/rest": "^22.0.0"
}
...
Relevant log output
Code of Conduct
- I agree to follow this project's Code of Conduct
Metadata
Metadata
Assignees
Labels
Status: TriageThis is being looked at and prioritizedThis is being looked at and prioritizedType: BugSomething isn't working as documentedSomething isn't working as documented
Type
Projects
Status
🆕 Triage