Reproduction
func cannot choose between multiple fallback methods:
src/build.command.ts
import { CommandMajor, Container, Handler } from 'func'
@CommandMajor()
class BuildCommand {
@Handler()
build() {}
@Handler()
rebuild() {}
}
new Container([BuildCommand])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() {}
}
new Container([BuildCommand])