Skip to content

Commit

Permalink
refactor(command): refactor ICommandOption interface
Browse files Browse the repository at this point in the history
  • Loading branch information
c4spar committed Jul 14, 2020
1 parent e3c8660 commit 88263b5
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions packages/command/lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ export type IDescription = string | ( ( this: Command ) => string );
/** Action handler. */
export type IAction<O, A extends Array<any>> = ( this: Command, options: O, ...args: A ) => void | Promise<void>;

/** Omit key from object. */
type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>

/** Argument details. */
export interface IArgumentDetails extends IFlagArgument {
/** Argument name. */
Expand All @@ -22,14 +19,8 @@ export interface IArgumentDetails extends IFlagArgument {
}

/** Command settings. */
export interface ICommandOption<O = any, A extends Array<any> = any> extends Omit<Omit<Omit<Omit<Omit<Omit<Omit<IFlagOptions,
'name'>,
'args'>,
'type'>,
'optionalValue'>,
'aliases'>,
'variadic'>,
'list'> {
export interface ICommandOption<O = any, A extends Array<any> = any> extends Omit<IFlagOptions,
'name' | 'args' | 'type' | 'optionalValue' | 'aliases' | 'variadic' | 'list'> {
override?: boolean;
hidden?: boolean;
global?: boolean;
Expand Down

0 comments on commit 88263b5

Please sign in to comment.