Documentation
    Preparing search index...

    Function createEffect

    • Defines a reusable effect descriptor.

      Effects model external or expensive work such as HTTP requests, RPC reads, or webhook calls. The descriptor is inert: creating it does not execute the handler or allocate caches. Pass it to EffectRunner.call to validate input, deduplicate same-input calls, apply rate limits, and optionally persist results through iso-kv.

      The input schema output is used for both handler execution and cache-key generation, so schema transforms are reflected consistently. The output schema validates handler results and cached values before they are returned.

      Type Parameters

      • InputSchema extends StandardSchemaV1<any, any>
      • OutputSchema extends StandardSchemaV1<any, any>

      Parameters

      Returns Effect<InferOutput<InputSchema>, InferOutput<OutputSchema>>