definePlugin function
Defines a plugin.
import { definePlugin } from '@dioramajs/diorama/core'The result is a frozen function: call it with options for a configured copy.
function definePlugin<N extends string, O extends object = Empty, DO extends Partial<OptionsOf<O, DO, SO>> = Empty, S = void, D extends readonly DependencyRef[] = [], OD extends readonly DependencyRef[] = [], SI = unknown, SO extends object = Empty>(
definition: PluginDefinition<N, O, DO, S, D, OD, SI, SO>,
): Plugin<N, OptionsOf<O, DO, SO>, ServiceFor<N, S>, RequiredOptions<OptionsOf<O, DO, SO>, DO, SI>>Parameters
| Name | Type | Description |
|---|---|---|
definition | PluginDefinition<N, O, DO, S, D, OD, SI, SO> |
Also exported from @dioramajs/core.
Defined in packages/core/src/kernel/plugin.ts.