diff --git a/src/shared/core/decorators.ts b/src/shared/core/decorators.ts index 72673874..7ec50e8f 100644 --- a/src/shared/core/decorators.ts +++ b/src/shared/core/decorators.ts @@ -19,10 +19,13 @@ export function Commander(options?: CommanderOptions): ClassDecorator { }; } -export function Command(options: CommandOptions): MethodDecorator { +export function Command(options?: Partial): MethodDecorator { return (target, key) => { const commandData: CommandMetadata = { - options, + options: { + name: key, + ...options, + }, func: target[key], }; MetadataReflect.defineMetadata(