Skip to content

Commit

Permalink
fix(typescript): Github.plugin is a static method, not an instance me…
Browse files Browse the repository at this point in the history
…thod
  • Loading branch information
mamodom authored and gr2m committed Nov 18, 2018
1 parent ef4d35a commit 01763bf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/templates/index.d.ts.tpl
Expand Up @@ -207,7 +207,7 @@ declare class Github {
wrap(name: string, callback: (request: (options: Github.HookOptions) => Promise<Github.Response<any>>, options: Github.HookOptions) => void): void
}

plugin(plugin: Github.Plugin | [Github.Plugin]): Github
static plugin(plugin: Github.Plugin | [Github.Plugin]): Github

registerEndpoints(routes: any): void

Expand Down
2 changes: 1 addition & 1 deletion test/typescript-validate.ts
Expand Up @@ -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)
Expand Down

0 comments on commit 01763bf

Please sign in to comment.