中文
← Errors

F_SYSTEM_HANDLER_PATH_ALIAS_CONFLICT

Handler path does not support alias

A path-selected @Handler also declares an alias, which is only valid for handler flags.

Updated 2 weeks ago

Reproduction

Aliases abbreviate option flags and cannot abbreviate positional paths:

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

class ProjectCommand {
  @Handler({ path: ['project', 'list'], alias: 'l' })
  list() {}
}

How to fix it

Remove the alias, or replace the path with a flag and keep the alias:

src/project.command.ts
class ProjectCommand {
  @Handler({ path: ['project', 'list'] })
  list() {}
}