Documentation
    Preparing search index...

    Interface PluginCapability<T>

    A typed key naming one thing a host can hand a plugin (RFC 0002 §2).

    The type parameter is carried by PluginCapability.capabilityType, which is never present at runtime — it exists so that context.require(RENDERER_REGISTRY) is a RendererRegistry to the compiler while this file names nothing but a string and a phantom type. That is what lets each registry's owning package declare its own token without core gaining an edge to it, and what makes a sixth capability additive.

    interface PluginCapability<T> {
        capabilityType?: T;
        name: string;
        revocable: boolean;
    }

    Type Parameters

    • T
    Index
    capabilityType?: T

    Phantom carrier for T. Never assigned, never read; declaring it is the only way an interface can be generic in a value it does not hold.

    name: string

    The capability's identity, e.g. "fourJS:renderer-registry".

    revocable: boolean

    Whether a plugin that acquired this capability can still be uninstalled (RFC 0002 §4). Default false, by owner decision (Q3, register row 6: "conservative default (non-revocable)").