Skip to content

Intermact API Reference / @intermact/core / definePlugin

Function: definePlugin()

definePlugin(plugin): IntermactPlugin

Defined in: packages/core/src/extend/plugin.ts:25

Identity helper that types a plugin definition (design.md §18). Use it so the install hook's registries parameter is inferred and the object shape is checked at the definition site.

Parameters

plugin

IntermactPlugin

Returns

IntermactPlugin

Intermact v1.0 — 文档覆盖 Phase-1 / Phase-2 / Phase-3(全阶段)