Skip to content

Commit

Permalink
feat(command): make args parameter optional in .parse() method
Browse files Browse the repository at this point in the history
  • Loading branch information
c4spar committed May 24, 2020
1 parent d1115f3 commit fabfd32
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions packages/command/lib/base-command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -461,11 +461,7 @@ export class BaseCommand<O = any, A extends Array<any> = any> {
* @param args Command line args to parse. Ex: `cmd.parse( Deno.args )`
* @param dry Execute command after parsed.
*/
public async parse( args: string[], dry?: boolean ): Promise<IParseResult<O, A>> {

// if ( !this.name ) {
// throw new Error( 'Missing command name' );
// }
public async parse( args: string[] = Deno.args, dry?: boolean ): Promise<IParseResult<O, A>> {

this.reset();

Expand Down

0 comments on commit fabfd32

Please sign in to comment.