diff --git a/scripts/templates/index.d.ts.tpl b/scripts/templates/index.d.ts.tpl index ab4bc47a..1bb23132 100644 --- a/scripts/templates/index.d.ts.tpl +++ b/scripts/templates/index.d.ts.tpl @@ -207,7 +207,7 @@ declare class Github { wrap(name: string, callback: (request: (options: Github.HookOptions) => Promise>, options: Github.HookOptions) => void): void } - plugin(plugin: Github.Plugin | [Github.Plugin]): Github + static plugin(plugin: Github.Plugin | [Github.Plugin]): Github registerEndpoints(routes: any): void diff --git a/test/typescript-validate.ts b/test/typescript-validate.ts index 5e00617c..32dafa27 100644 --- a/test/typescript-validate.ts +++ b/test/typescript-validate.ts @@ -77,7 +77,7 @@ export default async function() { // add logic before, after, catch errors or replace the request altogether return request(options) }) - octokit.plugin((octokit, options) => { + Octokit.plugin((octokit, options) => { octokit.hook.wrap('request', async (request, options) => { const time = Date.now() const response = await request(options)