中文
← Errors

F_SYSTEM_HANDLER_FLAG_PATH_CONFLICT

Handler flag conflicts with path

A @Handler tries to select the same method by both an option flag and a positional path.

Updated 2 weeks ago

Reproduction

A handler must use exactly one selection mode:

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

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

How to fix it

Keep either flag or path:

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