const symbol = Symbol('Command Options'); export type CommandOptions = T & { readonly [symbol]: true; }; export function commandOptions(options: T): CommandOptions { (options as any)[symbol] = true; return options as CommandOptions; } export function isCommandOptions(options: any): options is CommandOptions { return options?.[symbol] === true; }