Editor Integration
Constantly switching between your code editor and documentation to check available commands can disrupt your workflow. You can streamline this by integrating type definitions directly into your editor’s language server.
Create a local copy of the commands.d.ts file and save it to your documents folder.
Then setup a jsconfig.json to include this type definitions file:
{ "include": ["bots/**/*", "commands.d.ts"]}The final result might look something like:
Directory
documents/vexed/
jsconfig.json
commands.d.ts
…
Directory
bots/
- my_bot.js
Caveats
Section titled “Caveats”- Typings for cmd.register_command are awkward, particularly
botandctxare not included in the Command interface.