What happened?
webhooks property type of App cannot be resolved when using Yarn's Plug'n'Play mode.
Here's dist-types/app.d.ts in octokit@4.1.3:
import { App as DefaultApp } from "@octokit/app";
import { OAuthApp as DefaultOAuthApp } from "@octokit/oauth-app";
export declare const App: (new (...args: any[]) => {
// ...
webhooks: import("@octokit/webhooks").Webhooks<{ // this property resolves its type as `any`.
octokit: import("@octokit/core").Octokit & {
paginate: import("@octokit/plugin-paginate-rest").PaginateInterface;
} & import("@octokit/plugin-paginate-graphql").paginateGraphQLInterface & import("@octokit/plugin-rest-endpoint-methods").Api & {
retry: {
retryRequest: (error: import("@octokit/request-error").RequestError, retries: number, retryAfter: number) => import("@octokit/request-error").RequestError;
};
};
}>;
// ...
}) & typeof DefaultApp;
It's a typical ghost dependency problem; Exported App type requires dependencies from @octokit/app to be specified in octokit's dependencies as well though it's just exporting the types, not actual module.
Here's a workaround for pnp users like me:
packageExtensions:
octokit@*:
dependencies:
"@octokit/webhooks": "*"
Versions
octokit@npm:4.1.3
Code of Conduct
What happened?
webhooksproperty type ofAppcannot be resolved when using Yarn's Plug'n'Play mode.Here's
dist-types/app.d.tsinoctokit@4.1.3:It's a typical ghost dependency problem; Exported
Apptype requires dependencies from@octokit/appto be specified inoctokit's dependencies as well though it's just exporting the types, not actual module.Here's a workaround for pnp users like me:
Versions
octokit@npm:4.1.3
Code of Conduct