TypeScript
This guide contains how to convert your custom plugins to using TypeScript.
First, change your plugin's filetype from .js
to .ts
Compiling your TypeScript written plugins
Run the command:
This will compile your TypeScript plugin to plain JavaScript.
Using NPM Packages/Dependencies
As we know importing the npm dependencies will cause a type error that the module is not installed. So what you need to do is install them manually by running this command:
where ...packages
is a list of npm packages that your plugin requires to run.
NOTE This is just an alias for
Now you can compile your plugins without facing any type errors.
Plugin Configuration [TODO]
Also, see:
Last updated