# defineEffect

function in `@dioramajs/diorama`

```ts
import { defineEffect } from '@dioramajs/diorama'
```

Checks a definition and returns it as a frozen callable. Registers and loads nothing.
Throws `EFFECT_DEFINITION` on a bad definition.

```ts
function defineEffect<P extends ParamSpec = Empty>(
  definition: EffectDefinition<P> & CheckParams<P>,
): Effect<WidenSpec<P>>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `definition` | `EffectDefinition<P> & CheckParams<P>` |  |

Also exported from `@dioramajs/diorama/auto`, `@dioramajs/diorama/effects`, `@dioramajs/effects`, `@dioramajs/effects/effect`.

Defined in [packages/effects/src/effect.ts](https://github.com/MasterKurosava/diorama/blob/main/packages/effects/src/effect.ts#L197).
