Documentation
    Preparing search index...

    Interface Effect<Input, Output>

    Handle for an external-call effect created via createEffect.

    Effect descriptors are immutable and reusable. They do not own cache, memoization, rate-limit, or stats state; that state is isolated inside each EffectRunner.

    interface Effect<Input = unknown, Output = unknown> {
        cache: boolean;
        handler: EffectHandler<Input, Output>;
        input: StandardSchemaV1<Input>;
        name: string;
        output: StandardSchemaV1<Output>;
        rateLimit: RateLimit;
    }

    Type Parameters

    • Input = unknown
    • Output = unknown
    Index
    cache: boolean

    Whether calls should use persistent cache when a runner has kv.

    Work function executed on cache miss after rate-limit capacity is acquired.

    input: StandardSchemaV1<Input>

    Schema used to validate and normalize raw call input.

    name: string

    Unique effect name within a runner. Used in cache keys and error messages.

    output: StandardSchemaV1<Output>

    Schema used to validate handler results and cached outputs.

    rateLimit: RateLimit

    Fixed-window limit applied to cache misses before handler execution.