- Command
Args
interfaces must now extend ParsedArguments
import { ... ParsedArguments } from 'ts-commands'; // Add the import
interface Args extends ParsedArguments { // Add "extends ParsedArguments"
...
}
- Remove
signature
and replace with key
.
// signature = 'farewell [fname] [lname]' // Remove this line
key = 'farewell' // and replace it with this
- In your index file (or wherever you call
registerCommands
), replace with a CommandDispatcher
// import { registerCommands } from 'ts-commands'; // Remove this
import { CommandDispatcher } from 'ts-commands'; // Add this
// Remove these lines
// registerCommands({
// name: examples,
// commands: [Command1, Command2],
//});
// And replace it with this:
new CommandDispatcher({
commands: [Command1, Command2],
}).run();