Skip to content

Commit

Permalink
breaking(command): rename IFlagsParseResult to IParseResult
Browse files Browse the repository at this point in the history
  • Loading branch information
c4spar committed May 20, 2020
1 parent 8a153a7 commit eaeb634
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions packages/command/lib/base-command.ts
Expand Up @@ -9,7 +9,7 @@ import { BooleanType } from '../types/boolean.ts';
import { NumberType } from '../types/number.ts';
import { StringType } from '../types/string.ts';
import { Type } from '../types/type.ts';
import { CommandMap, IAction, IArgumentDetails, ICommandOption, ICompleteHandler, ICompleteHandlerMap, IEnvVariable, IExample, IFlagsParseResult, IHelpCommand, IOption, isHelpCommand } from './types.ts';
import { CommandMap, IAction, IArgumentDetails, ICommandOption, ICompleteHandler, ICompleteHandlerMap, IEnvVariable, IExample, IParseResult, IHelpCommand, IOption, isHelpCommand } from './types.ts';

const permissions: any = ( Deno as any ).permissions;
const envPermissionStatus: any = permissions && permissions.query && await permissions.query( { name: 'env' } );
Expand Down Expand Up @@ -442,7 +442,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<IFlagsParseResult<O, A>> {
public async parse( args: string[], dry?: boolean ): Promise<IParseResult<O, A>> {

// if ( !this.name ) {
// throw new Error( 'Missing command name' );
Expand Down Expand Up @@ -496,7 +496,7 @@ export class BaseCommand<O = any, A extends Array<any> = any> {
* @param options A map of options.
* @param args Command arguments.
*/
protected async execute( options: O, ...args: A ): Promise<IFlagsParseResult<O, A>> {
protected async execute( options: O, ...args: A ): Promise<IParseResult<O, A>> {

const actionOption = this.findActionFlag( options );

Expand Down
2 changes: 1 addition & 1 deletion packages/command/lib/types.ts
Expand Up @@ -60,7 +60,7 @@ export interface IExample {
}

/** Result of `cmd.parse()`. */
export interface IFlagsParseResult<O, A> {
export interface IParseResult<O, A> {
options: O,
args: A
cmd: BaseCommand<O>;
Expand Down

0 comments on commit eaeb634

Please sign in to comment.