import { ArgumentResolved, CommandArgument } from '../arguments'; import { SubCommand } from '../commands'; import { CommandContext, CommandContextBuilder } from './CommandContext'; /** * The object to create a new SubCommandContext. */ export interface SubCommandContextBuilder extends CommandContextBuilder { /** * The SubCommand related to this SubcommandContext. */ subCommand: SubCommand; } /** * @see {@link https://ayfri.gitbook.io/advanced-command-handler/concepts/commands/context} */ export declare class SubCommandContext extends CommandContext { /** * The SubCommand related to this SubcommandContext. */ subCommand: SubCommand; /** * Creates a new SubCommandContext associated to a SubCommand. * * @param options - The options of this context. */ constructor(options: SubCommandContextBuilder); /** * Returns the list of arguments of the SubCommand. */ get arguments(): CommandArgument[]; /** * Resolves all of the arguments of the SubCommand. * If an argument has an error it will return a {@link CommandError}. * * @typeParam T - The type of the arguments as an union. * @returns - A map of arguments or undefined if the SubCommand has no arguments. */ resolveArguments(): Promise>>; /** * Returns the name of the subCommand associated to this SubCommandContext. */ get subCommandName(): string; }