Typegres API Reference - v0.2.0
    Preparing search index...

    Function inMemoryChannel

    • Build a RawChannel that handles RPC calls in-process: parse the code, evaluate it under exoeval with api bound to the given root capability, and return the result via safeStringify.

      Real deployments swap this for a transport that sends the same code string over a wire (HTTP body, WebSocket frame, MessagePort message, etc.) and runs the same evaluate-and-stringify logic on the server end. The contract is: input is a JS expression string, output is a JSON-serialized result.

      Type Parameters

      • A

      Parameters

      • api: A

      Returns RawChannel