Documentation
    Preparing search index...

    Interface FourPlugin

    §81's plugin, plus the two fields §81's closing sentence requires ("plugins shall declare dependencies and compatibility ranges") and did not put in its code block.

    const gridPlugin: FourPlugin = {
    name: "@vendor/grid",
    version: "1.2.0",
    engineRange: "^0.1.0",
    install(context) {
    context.require(SIMULATION_SYSTEMS).register(new GridSystem());
    },
    };
    interface FourPlugin {
        dependencies?: readonly PluginDependency[];
        engineRange?: string;
        name: string;
        version: string;
        install(context: PluginContext): void | Promise<void>;
        uninstall?(context: PluginContext): void;
    }
    Index
    dependencies?: readonly PluginDependency[]

    Other plugins that must be installed first (§81).

    engineRange?: string

    The range of PLUGIN_API_VERSION this plugin accepts (§81, §90). Absent means "any" — the plugin makes no compatibility claim.

    name: string

    Stable identity; the key for dependency resolution and for refusals.

    version: string

    This plugin's own version, as X.Y.Z. Reported by every refusal.

    • Runs once, during PluginHost.install, with the capabilities the host provides. May be asynchronous — which is exactly why installation cannot happen in a constructor and lives in §45's initialize lifecycle step instead.

      Parameters

      Returns void | Promise<void>