import type { ClercFlagsDefinition, Command, CommandHandler, CommandWithHandler, ParameterDefinitionValue, } from "./types"; export const defineCommand = < Name extends string, const Parameters extends readonly ParameterDefinitionValue[], Flags extends ClercFlagsDefinition, >( command: Command, handler?: NoInfer>>, ): CommandWithHandler => ({ ...command, handler });