Libraries
    Preparing search index...

    Type Alias TypedClient<T>

    TypedClient: {
        [G in keyof T]: { [E in keyof T[G]]: ContractMemberCall<T[G][E]> }
    }

    Maps an ApiContract to a fully typed client object.

    Each group becomes a namespace and each endpoint within that group becomes a callable async function (HTTP) or subscription factory (WS).

    Type Parameters

    • T extends ApiContract

      The exact API contract type (preserving endpoint builder generics).

    // Given:
    const api = defineApi({
    todos: { list: ..., create: ..., delete: ... },
    auth: { login: ... },
    });

    type Client = TypedClient<typeof api>;
    // {
    // todos: {
    // list: (args: { query: ... }) => Promise<TodoResponse[]>,
    // create: (args: { body: ... }) => Promise<TodoResponse>,
    // delete: (args: { params: ... }) => Promise<void>,
    // },
    // auth: {
    // login: (args: { body: ... }) => Promise<{ token: string }>,
    // },
    // }