import { Except } from 'type-fest' ; import { Command } from '../command' ; import { addCommandData } from '../reflection' ; import { CommandMetadata } from '../types' ; param name param config returns export function config ( name , config ) { return target => { const isCommand = target . prototype instanceof Command ; if ( ! isCommand ) { throw new TypeError ( 'You can only use @name() on a class that extends Command!' ) ; } const metadata = { name , ... config , } ; addCommandData ( target , metadata ) ; } ; }