Skip to content

definePlugin

definePlugin<Instance>(descriptor): FlakyPluginDescriptor<Instance>

Defined in: packages/core/src/store/plugin.ts:52

Register a plugin descriptor.

Silent overwrites would make the registry a last-import-wins lottery, so duplicate names are rejected. Re-calling definePlugin with the same descriptor instance (module-init idempotence) is allowed.

Instance

FlakyPluginDescriptor<Instance>

FlakyPluginDescriptor<Instance>

Error when another descriptor with descriptor.name is already registered and it isn’t the same object reference.