Skip to content

Commit

Permalink
refactor(command): remove OptionType type from IArgumentDetails
Browse files Browse the repository at this point in the history
  • Loading branch information
c4spar committed Jul 14, 2020
1 parent 9ec513c commit c8dc229
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/command/lib/arguments-parser.ts
Expand Up @@ -36,7 +36,7 @@ export class ArgumentsParser {
}

const parts: string[] = arg.split( this.ARGUMENT_DETAILS_REGEX );
const type: OptionType | string | undefined = parts[ 2 ] ? parts[ 2 ] : OptionType.STRING;
const type: string | undefined = parts[ 2 ] || OptionType.STRING;

let details: IArgumentDetails = {
optionalValue: arg[ 0 ] !== '<',
Expand Down
4 changes: 2 additions & 2 deletions packages/command/lib/types.ts
@@ -1,4 +1,4 @@
import { IFlagArgument, IFlagOptions, ITypeHandler, OptionType } from '../../flags/lib/types.ts';
import { IFlagArgument, IFlagOptions, ITypeHandler } from '../../flags/lib/types.ts';
import { Type } from '../types/type.ts';
import { Command } from './command.ts';

Expand All @@ -15,7 +15,7 @@ export interface IArgumentDetails extends IFlagArgument {
/** Shell completion action. */
action: string;
/** Arguments type. */
type: OptionType | string;
type: string;
}

/** Command settings. */
Expand Down

0 comments on commit c8dc229

Please sign in to comment.