more typings
This commit is contained in:
parent
92f1f2ee1c
commit
4a15edefa1
2
index.ts
2
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, ICommand } from './src/interfaces/Command.js';
|
||||
export { CommandDefinition, ICommand, CommandOpts } from './src/interfaces/Command.js';
|
@ -4,7 +4,11 @@ import SubcommandOption from '../classes/SubcommandOption.js';
|
||||
import { ArgsResult } from '../Parser.js';
|
||||
import { CommandOptionDefinition } from './CommandOption.js';
|
||||
|
||||
|
||||
export type CommandOpts = {
|
||||
args?: ArgsResult,
|
||||
subcommand?: string | null,
|
||||
subcommandGroup?: string | null
|
||||
}
|
||||
interface ICommand {
|
||||
|
||||
name: string,
|
||||
@ -20,7 +24,7 @@ interface ICommand {
|
||||
|
||||
subcommandGroup(name: string): SubcommandGroupOption | null
|
||||
|
||||
execute(message: unknown, opts?: {args?: ArgsResult, subcommand?: string, subcommandGroup?: string}): Promise<unknown>
|
||||
execute(message: unknown, opts?: CommandOpts): Promise<unknown>
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user