Reproduction
func cannot choose between multiple fallback methods:
src/build.command.ts
import { CommandMajor, Handler, Module, createApp } from 'func'
@CommandMajor()
class BuildCommand {
@Handler()
build() {}
@Handler()
rebuild() {}
}
@Module({ commands: [BuildCommand] })
class AppModule {}
createApp(AppModule)How to fix it
Keep one default handler and give every additional handler a flag or path:
src/build.command.ts
@CommandMajor()
class BuildCommand {
@Handler()
build() {}
@Handler({ flag: 'rebuild' })
rebuild() {}
}
@Module({ commands: [BuildCommand] })
class AppModule {}
createApp(AppModule)