Comparing version 0.3.2 to 0.3.3
@@ -119,4 +119,5 @@ declare const DOUBLE_DASH = "--"; | ||
declare type Handler<C extends CommandRecord = CommandRecord, K extends keyof C = keyof C> = (ctx: HandlerContext<C, K>) => void; | ||
declare type FallbackType<T, U> = {} extends T ? U : T; | ||
declare type InspectorContext<C extends CommandRecord = CommandRecord> = HandlerContext<C> & { | ||
flags: {} extends TypeFlag<NonNullableFlag<C[keyof C]["flags"]>>["flags"] ? Dict<any> : TypeFlag<NonNullableFlag<C[keyof C]["flags"]>>["flags"]; | ||
flags: FallbackType<TypeFlag<NonNullableFlag<C[keyof C]["flags"]>>["flags"], Dict<any>>; | ||
}; | ||
@@ -290,2 +291,2 @@ declare type Inspector<C extends CommandRecord = CommandRecord> = (ctx: InspectorContext<C>, next: () => void) => void; | ||
export { CamelCase, Clerc, Command, CommandExistsError, CommandOptions, CommandRecord, CommonCommandExistsError, Dict, Enhance, Flag, FlagOptions, Handler, HandlerContext, Inspector, InspectorContext, KebabCase, LiteralUnion, MakeEventMap, MaybeArray, NoSuchCommandError, Plugin, PossibleInputKind, Primitive, SingleCommand, SingleCommandError, SingleCommandType, camelCase, compose, defineHandler, defineInspector, definePlugin, kebabCase, mustArray, resolveArgv, resolveCommand, resolveFlagAlias, resolveFlagDefault }; | ||
export { CamelCase, Clerc, Command, CommandExistsError, CommandOptions, CommandRecord, CommonCommandExistsError, Dict, Enhance, FallbackType, Flag, FlagOptions, Handler, HandlerContext, Inspector, InspectorContext, KebabCase, LiteralUnion, MakeEventMap, MaybeArray, NoSuchCommandError, Plugin, PossibleInputKind, Primitive, SingleCommand, SingleCommandError, SingleCommandType, camelCase, compose, defineHandler, defineInspector, definePlugin, kebabCase, mustArray, resolveArgv, resolveCommand, resolveFlagAlias, resolveFlagDefault }; |
{ | ||
"name": "clerc", | ||
"version": "0.3.2", | ||
"version": "0.3.3", | ||
"author": "Ray <nn_201312@163.com> (https://github.com/so1ve)", | ||
@@ -5,0 +5,0 @@ "description": "Clerc is a simple and easy-to-use cli framework.", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
586
23164