Namespace for dealing with installed plug-ins. Plug-ins are represented by an plug-in-interface which enables reflection on them.
Plug-in writers can provide APIs to other plug-ins by returning their API public surface from the start-call.
start
export function start() { let api = { sum(a, b) { return a + b; }, mul(a, b) { return a * b; } }; // 'export' public api-surface return api;} Copy
export function start() { let api = { sum(a, b) { return a + b; }, mul(a, b) { return a * b; } }; // 'export' public api-surface return api;}
let mathExt = plugins.getPlugin('genius.math');let importedApi = mathExt.exports;console.log(importedApi.mul(42, 1)); Copy
let mathExt = plugins.getPlugin('genius.math');let importedApi = mathExt.exports;console.log(importedApi.mul(42, 1));
Namespace for dealing with installed plug-ins. Plug-ins are represented by an plug-in-interface which enables reflection on them.
Plug-in writers can provide APIs to other plug-ins by returning their API public surface from the
start
-call.