defineEffect function
Checks a definition and returns it as a frozen callable.
import { defineEffect } from '@dioramajs/diorama'Registers and loads nothing. Throws EFFECT_DEFINITION on a bad definition.
function defineEffect<P extends ParamSpec = Empty>(
definition: EffectDefinition<P> & CheckParams<P>,
): Effect<WidenSpec<P>>Parameters
| Name | 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.