handleEffects
handleEffects<
EffectsConfig,Exhaustive>(effects:undefined|EffectMatchbox[],matchers:MatchCases<EffectsConfig,any,Exhaustive>,exhaustive:Exhaustive):void
Defined in: extras/effects.ts:45
Handles an array of effect matchboxes by matching them against provided cases.
Use cases:
- Executing effect handlers based on effect type
- Ensuring exhaustive handling of all effect cases
Type Parameters
Section titled “Type Parameters”| Type Parameter | Default type | Description |
|---|---|---|
EffectsConfig extends TaggedTypes | - | The tagged types configuration for effects |
Exhaustive extends boolean | true | Whether exhaustive matching is required |
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
effects | undefined | EffectMatchbox[] | Array of effect matchboxes to handle |
matchers | MatchCases<EffectsConfig, any, Exhaustive> | Object mapping effect types to handler functions |
exhaustive | Exhaustive | Whether to enforce exhaustive matching (default: false) |
Returns
Section titled “Returns”void