Documentation
    Preparing search index...

    Interface EffectOptions<InputSchema, OutputSchema>

    Options accepted by createEffect.

    Schemas must implement Standard Schema v1 and validate synchronously. The input schema output is used for both the handler argument and stable cache-key generation.

    interface EffectOptions<
        InputSchema extends StandardSchemaV1 = StandardSchemaV1,
        OutputSchema extends StandardSchemaV1 = StandardSchemaV1,
    > {
        cache?: boolean;
        input: InputSchema;
        name: string;
        output: OutputSchema;
        rateLimit?: RateLimit;
    }

    Type Parameters

    • InputSchema extends StandardSchemaV1 = StandardSchemaV1
    • OutputSchema extends StandardSchemaV1 = StandardSchemaV1
    Index
    cache?: boolean

    Whether this effect should use the runner's persistent cache.

    Standard Schema used to validate and normalize inputs.

    name: string

    Unique effect name. Used for cache namespace and debugging.

    output: OutputSchema

    Standard Schema used to validate handler outputs and cached outputs.

    rateLimit?: RateLimit

    Rate limit for this effect. Set to false or omit to disable rate limiting.