Registration configuration for commands.

interface CommandRegistration {
    commandType: new (...args: any[]) => Command;
    handler:
        | CommandHandler<any, any>
        | new (...args: any[]) => CommandHandler<any, any>;
    singleton?: boolean;
}

Properties

commandType: new (...args: any[]) => Command

The command type (class).

handler:
    | CommandHandler<any, any>
    | new (...args: any[]) => CommandHandler<any, any>

The handler instance or class.

singleton?: boolean

Whether to register as singleton (default: false, uses transient).