From 8881f5c6d9938191c0730e8014a25d2f53b60f81 Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Tue, 15 Aug 2023 16:43:50 +0300 Subject: [PATCH] Export command interface --- index.ts | 2 +- src/Parser.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/index.ts b/index.ts index 30728f7..1aff347 100644 --- a/index.ts +++ b/index.ts @@ -7,4 +7,4 @@ export { SubcommandOption } from './src/classes/SubcommandOption.js'; export { IResolver } from './src/interfaces/Resolver.js'; export { OptionType, CommandOptionDefinition } from './src/interfaces/CommandOption.js'; -export { CommandDefinition } from './src/interfaces/Command.js'; \ No newline at end of file +export { CommandDefinition, ICommand } from './src/interfaces/Command.js'; \ No newline at end of file diff --git a/src/Parser.ts b/src/Parser.ts index d30b080..63a276c 100644 --- a/src/Parser.ts +++ b/src/Parser.ts @@ -138,7 +138,7 @@ class Parser extends EventEmitter { parseResult.subcommandGroup = group?.name || null; if (!subcommand) - throw new ParseError(`Expecting subcommand, one of ${subcommands.map((s) => s.name)}`); // return { showUsage: true, verbose: true }; + throw new ParseError(`Expecting subcommand, one of ${subcommands.map((s) => s.name).join(', ')}`); // return { showUsage: true, verbose: true }; this.debug(`Got ${subcommand.name}`); }