Skip to content

Commit

Permalink
refactor(ts)!: ship yargs.d.ts (#1671)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: yargs now ships with its own types
  • Loading branch information
mleguen committed Jul 19, 2020
1 parent 56a589f commit c06f886
Show file tree
Hide file tree
Showing 3 changed files with 774 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/yargs.ts
Expand Up @@ -1394,10 +1394,12 @@ export function Yargs (processArgs: string | string[] = [], cwd = process.cwd(),

// rebase an absolute path to a relative one with respect to a base directory
// exported for tests
export function rebase (base: string, dir: string) {
return path.relative(base, dir)
export interface RebaseFunction {
(base: string, dir: string): string
}

export const rebase: RebaseFunction = (base, dir) => path.relative(base, dir)

/** Instance of the yargs module. */
export interface YargsInstance {
$0: string
Expand Down
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -12,6 +12,7 @@
"files": [
"index.js",
"yargs.js",
"yargs.d.ts",
"build",
"locales",
"LICENSE"
Expand Down

0 comments on commit c06f886

Please sign in to comment.