wormhole/clients/js/cmds/Yargs.ts

19 lines
350 B
TypeScript

import yargs from "yargs";
export class Yargs {
yargs: typeof yargs;
constructor(y: typeof yargs) {
this.yargs = y;
}
addCommands = (addCommandsFn: YargsAddCommandsFn) => {
this.yargs = addCommandsFn(this.yargs);
return this;
};
y = () => this.yargs;
}
export type YargsAddCommandsFn = (y: typeof yargs) => typeof yargs;