Skip to content

Commit 01763bf

Browse files
mamodomgr2m
authored andcommitted
fix(typescript): Github.plugin is a static method, not an instance method
1 parent ef4d35a commit 01763bf

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

scripts/templates/index.d.ts.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ declare class Github {
207207
wrap(name: string, callback: (request: (options: Github.HookOptions) => Promise<Github.Response<any>>, options: Github.HookOptions) => void): void
208208
}
209209

210-
plugin(plugin: Github.Plugin | [Github.Plugin]): Github
210+
static plugin(plugin: Github.Plugin | [Github.Plugin]): Github
211211

212212
registerEndpoints(routes: any): void
213213

test/typescript-validate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export default async function() {
7777
// add logic before, after, catch errors or replace the request altogether
7878
return request(options)
7979
})
80-
octokit.plugin((octokit, options) => {
80+
Octokit.plugin((octokit, options) => {
8181
octokit.hook.wrap('request', async (request, options) => {
8282
const time = Date.now()
8383
const response = await request(options)

0 commit comments

Comments
 (0)