abstract class CommandA {
@Command("commandA")
@Infos({
testProp: "test info 1"
})
async run(command: CommandMessage) {
console.log(command.infos);
}
}
...
abstract class CommandB {
@Command("commandB")
@Infos({
testProp: "test info 2"
})
async run(command: CommandMessage) {
console.log(command.infos);
}
}
From example above in console will be printed the same object twice with "test info 1" or "test info 2" what depends on an order of processing in code part started from this line.
commandName property that in command argument passed in run function also has a wrong value by the same reasons.
From example above in console will be printed the same object twice with "test info 1" or "test info 2" what depends on an order of processing in code part started from this line. commandName property that in
command
argument passed inrun
function also has a wrong value by the same reasons.