中文
← Errors

F_SYSTEM_HANDLER_ALIAS_REQUIRES_FLAG

Handler alias requires a flag

A @Handler declares alias or aliases without declaring the flag they should abbreviate.

Updated

Reproduction

The aliases have no long-form handler flag to reference:

src/help.command.ts
import { Handler } from 'func'

class HelpCommand {
  @Handler({ aliases: ['h', '?'] })
  help() {}
}

How to fix it

Add the flag or remove the alias:

src/help.command.ts
class HelpCommand {
  @Handler({ flag: 'help', aliases: ['h', '?'] })
  help() {}
}