中文
← Errors

F_SYSTEM_INVALID_OVERRIDE_TARGET

Invalid option override target

@Override does not decorate exactly one instance field option, or it is used on an unsupported target.

Updated

Reproduction

@Override() does not declare an option on its own:

src/build.command.ts
import { Command, Handler, Module, Override, createApp } from 'func'

@Command('build')
class BuildCommand {
  @Override()
  verbose = false

  @Handler()
  run() {}
}

@Module({ commands: [BuildCommand] })
class AppModule {}

createApp(AppModule)

How to fix it

Place it beside exactly one @Flag(), @Value(), @ArrayString(), or @ArrayNumber() on an instance property of a Command or @Option() class. If there is no outer option to replace, remove @Override(). @OptionCommand uses overrideAll: true instead of a field decorator.