Skip to main content

Using JavaScript / TypeScript

If you're using JavaScript/TypeScript to develop your plugin, you can use the XTP CLI to generate some boilerplate code for you by invoking xtp plugin init and then select the Host App and Extension Point for which you want to develop the plug-in.

tip

Make sure to select 'TypeScript' from the language tabs.

The CLI will generate a TypeScript project with some of the standard files (e.g., package.json) to get you started. Modify the exported function(s) in the main.ts file with your desired business logic.

Reference the Extism PDK JavaScript instructions here if you need additional help.

Finally, invoke xtp plugin build to compile your source code into WebAssembly.