Documentation
Interfaces
client.Client

Interface: Client

client.Client

Properties

dispose

dispose: () => void

Type declaration

▸ (): void

Dispose of the client, destroy connections and clean up resources.

Returns

void

Defined in

src/client.ts:212 (opens in a new tab)

Methods

subscribe

subscribe<Data, Extensions>(request, sink): () => void

Subscribes to receive through a SSE connection.

It uses the sink to emit received data or errors. Returns a dispose function used for dropping the subscription and cleaning up.

Type parameters

NameType
DataRecord<string, unknown>
Extensionsunknown

Parameters

NameType
requestRequestParams
sinkSink<ExecutionResult<Data, Extensions>>

Returns

fn

▸ (): void

Subscribes to receive through a SSE connection.

It uses the sink to emit received data or errors. Returns a dispose function used for dropping the subscription and cleaning up.

Returns

void

Defined in

src/client.ts:205 (opens in a new tab)