Skip to content
This repository has been archived by the owner on Aug 22, 2023. It is now read-only.

Commit

Permalink
fix: use type aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Jan 31, 2018
1 parent ad1e4d4 commit b5070b5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/flags.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// tslint:disable interface-over-type-literal

import {AlphabetLowercase, AlphabetUppercase} from './alphabet'

export interface DefaultContext<T> { options: IOptionFlag<T>; flags: { [k: string]: string } }
Expand Down Expand Up @@ -91,5 +93,5 @@ export const defaultFlags = {
color: boolean({allowNo: true}),
}

export interface Output {[name: string]: any}
export type Output = {[name: string]: any}
export type Input<T extends Output> = { [P in keyof T]: IFlag<T[P]> }
4 changes: 3 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// tslint:disable interface-over-type-literal

import * as args from './args'
import {OutputArgs, OutputFlags, ParserOutput} from './parse'
export {args}
Expand All @@ -6,7 +8,7 @@ export {flags}
export {flagUsages} from './help'
import {deps} from './deps'

export interface ParserInput<TFlags extends flags.Output> {
export type ParserInput<TFlags extends flags.Output> = {
flags?: flags.Input<TFlags>
args?: args.Input
argv?: string[]
Expand Down

0 comments on commit b5070b5

Please sign in to comment.