import type { Command } from "commander"; export type NamedCommandDescriptor = { name: string; description: string; hasSubcommands: boolean; }; export type CommandGroupDescriptorSpec = { commandNames: readonly string[]; register: TRegister; }; export type ImportedCommandGroupDefinition = { commandNames: readonly string[]; loadModule: () => Promise; register: (module: TModule, args: TRegisterArgs) => Promise | void; }; export type ResolvedCommandGroupEntry = { placeholders: TDescriptor[]; register: TRegister; }; type CommandGroupEntryLike = { placeholders: NamedCommandDescriptor[]; register: (program: Command) => Promise | void; }; export declare function resolveCommandGroupEntries(descriptors: readonly TDescriptor[], specs: readonly CommandGroupDescriptorSpec[]): ResolvedCommandGroupEntry[]; export declare function buildCommandGroupEntries(descriptors: readonly NamedCommandDescriptor[], specs: readonly CommandGroupDescriptorSpec[], mapRegister: (register: TRegister) => CommandGroupEntryLike["register"]): CommandGroupEntryLike[]; export declare function defineImportedCommandGroupSpec(commandNames: readonly string[], loadModule: () => Promise, register: (module: TModule, args: TRegisterArgs) => Promise | void): CommandGroupDescriptorSpec<(args: TRegisterArgs) => Promise>; export declare function defineImportedCommandGroupSpecs(definitions: readonly ImportedCommandGroupDefinition[]): CommandGroupDescriptorSpec<(args: TRegisterArgs) => Promise>[]; type ProgramCommandRegistrar = (program: Command) => Promise | void; type AnyImportedProgramCommandGroupDefinition = { commandNames: readonly string[]; loadModule: () => Promise>; exportName: string; }; export type ImportedProgramCommandGroupDefinition, TKey extends keyof TModule & string> = { commandNames: readonly string[]; loadModule: () => Promise; exportName: TKey; }; export declare function defineImportedProgramCommandGroupSpec, TKey extends keyof TModule & string>(definition: ImportedProgramCommandGroupDefinition): CommandGroupDescriptorSpec<(program: Command) => Promise>; export declare function defineImportedProgramCommandGroupSpecs(definitions: readonly AnyImportedProgramCommandGroupDefinition[]): CommandGroupDescriptorSpec<(program: Command) => Promise>[]; export {};