Skip to content

Commit

Permalink
Merge branch 'getversion-types' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
philnash committed Sep 10, 2020
2 parents ec32217 + 5fd109b commit b61ebcf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ngrok.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ export function getApi(): RequestAPI<Request, CoreOptions, RequiredUriUrl> | nul
*/
export function authtoken(token: string | INgrokOptions): Promise<void>;

/**
*
* Gets the version of the ngrok binary.
*/
export function getVersion(options?: INgrokOptions): Promise<string>;

interface INgrokOptions {
/**
* Other "custom", indirectly-supported ngrok process options.
Expand Down
3 changes: 3 additions & 0 deletions process.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ async function setAuthtoken (optsOrToken) {
}
}

/**
* @param {INgrokOptions | undefined} opts
*/
async function getVersion(opts = {}) {
let dir = defaultDir;
if (opts.binPath) dir = opts.binPath(dir);
Expand Down

0 comments on commit b61ebcf

Please sign in to comment.