createClient
function createClient<TSchema>(options): Client<TSchema>;Defined in: client/src/client/client.ts:24
Create a typed client for a schema-described server. The TSchema type
parameter is the ApiSchema interface produced by generateClientTypes;
it is a pure compile-time contract — nothing about it exists at runtime, so
the client is a thin set of proxies that build request URLs from the property
path being accessed.
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
TSchema |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options |
ClientOptions |
Returns
Section titled “Returns”Client<TSchema>
Example
Section titled “Example”import type { ApiSchema } from './client.generated.js';const client = createClient<ApiSchema>({ baseUrl: 'http://localhost:3800' });const note = await client.providers.notes.entities.note.get('note_8f2a');