Reproduction
func cannot choose between multiple unknown-command fallbacks:
src/app.module.ts
import { CommandMissing, Handler, Module, createApp } from 'func'
@CommandMissing()
class FirstMissing {
@Handler()
run() {}
}
@CommandMissing()
class SecondMissing {
@Handler()
run() {}
}
@Module({ commands: [FirstMissing, SecondMissing] })
class AppModule {}
createApp(AppModule)How to fix it
Register exactly one missing command and consolidate the fallback behavior there:
src/app.module.ts
@CommandMissing()
class MissingCommand {
@Handler()
run() {}
}
@Module({ commands: [MissingCommand] })
class AppModule {}
createApp(AppModule)