Reproduction
Canonical path tokens and aliases share one namespace under the same parent path:
src/commands.ts
import { Command, Handler, Module, createApp } from 'func'
@Command('build')
class BuildCommand {
@Handler()
run() {}
}
@Command('build')
class RebuildCommand {
@Handler()
run() {}
}
@Module({ commands: [BuildCommand, RebuildCommand] })
class AppModule {}
createApp(AppModule)How to fix it
Keep every token unique under its parent path, or move one Command to a different path:
src/commands.ts
@Command('build')
class BuildCommand {
@Handler()
run() {}
}
@Command('rebuild')
class RebuildCommand {
@Handler()
run() {}
}
@Module({ commands: [BuildCommand, RebuildCommand] })
class AppModule {}
createApp(AppModule)