Skip to content

Commit

Permalink
fix(typescript): octokit.authenticate definitions using overloads
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfy1339 authored and gr2m committed Nov 26, 2018
1 parent b152011 commit 23ca22d
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions scripts/templates/index.d.ts.tpl
Expand Up @@ -105,13 +105,6 @@ declare namespace Github {
token: string;
}

export type Auth =
| AuthBasic
| AuthOAuthToken
| AuthOAuthSecret
| AuthUserToken
| AuthJWT;

export type Link =
| { link: string; }
| { headers: { link: string; }; }
Expand Down Expand Up @@ -198,7 +191,11 @@ declare namespace Github {

declare class Github {
constructor(options?: Github.Options);
authenticate(auth: Github.Auth): void;
authenticate(auth: Github.AuthBasic): void;
authenticate(auth: Github.AuthOAuthToken): void;
authenticate(auth: Github.AuthOAuthSecret): void;
authenticate(auth: Github.AuthUserToken): void;
authenticate(auth: Github.AuthJWT): void;
hook: {
before(name: string, callback: (options: Github.HookOptions) => void): void
Expand Down

0 comments on commit 23ca22d

Please sign in to comment.