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 31e14ad commit ad1e4d4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/parse.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// tslint:disable interface-over-type-literal

import * as _ from 'lodash'

import {Arg} from './args'
Expand All @@ -17,15 +19,15 @@ try {

export type OutputArgs<T extends ParserInput['args']> = { [P in keyof T]: any }
export type OutputFlags<T extends ParserInput['flags']> = { [P in keyof T]: any }
export interface ParserOutput<TFlags extends OutputFlags<any>, TArgs extends OutputArgs<any>> {
export type ParserOutput<TFlags extends OutputFlags<any>, TArgs extends OutputArgs<any>> = {
flags: TFlags
args: TArgs
argv: string[]
raw: ParsingToken[]
}

export interface ArgToken { type: 'arg'; input: string }
export interface FlagToken { type: 'flag'; flag: string; input: string }
export type ArgToken = { type: 'arg'; input: string }
export type FlagToken = { type: 'flag'; flag: string; input: string }
export type ParsingToken = ArgToken | FlagToken

export interface ParserInput {
Expand Down

0 comments on commit ad1e4d4

Please sign in to comment.