# definePlugin

function in `@dioramajs/diorama/core`

```ts
import { definePlugin } from '@dioramajs/diorama/core'
```

Defines a plugin. The result is a frozen function: call it with options for a configured copy.

```ts
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>>
```

| Parameter | 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](https://github.com/MasterKurosava/diorama/blob/main/packages/core/src/kernel/plugin.ts#L95).
