Documentation
    Preparing search index...

    Type Alias RouterClient<Router>

    Client type that provides type-safe request methods based on router inference

    type RouterClient<
        Router extends
            InferProtocol<
                Record<string, RouteOutput<Capability<StandardSchemaV1>, unknown>>,
            >,
    > = {
        request<Cmd extends string>(
            cmd: Cmd,
            args: Extract<Router, { cmd: Cmd }>["in"],
        ): Promise<Extract<Router, { cmd: Cmd }>["out"]>;
    }

    Type Parameters

    Index

    Methods

    Methods