中文
← Errors

F_SYSTEM_HANDLER_ALIAS_REQUIRES_FLAG

Handler alias requires a flag

A @Handler declares an alias without declaring the flag that alias should abbreviate.

Updated 2 weeks ago

Reproduction

An alias has no long-form handler flag to reference:

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

class HelpCommand {
  @Handler({ alias: 'h' })
  help() {}
}

How to fix it

Add the flag or remove the alias:

src/help.command.ts
class HelpCommand {
  @Handler({ flag: 'help', alias: 'h' })
  help() {}
}