Skip to main content

Interface: TypedDataBusClient<R, I>

Defined in: src/sdk/data/DataBus.ts:30

Experimental

A provider of subscribable DataItems. Each data item is accessed using a combination of a string label and a numeric index. The data item labels available from the provider are defined by its record type parameter.

Extended by

Type Parameters

Type ParameterDefault typeDescription
R extends Record<string, any>-The record describing the data items available from the client. The name of each property in the record defines one label that can be used to retrieve a data item, and the type of the property defines the value type of data items retrieved using the label (under any index).
I extends numbernumberThe indexes for which data items are available from the client.

Methods

getSubscribable()

getSubscribable<L>(label, index): Subscribable<Readonly<DataItem<R[L]>>>

Defined in: src/sdk/data/DataBus.ts:38

Experimental

Gets a subscribable for a data item.

Type Parameters

Type ParameterDescription
L extends stringThe label of the data item to get.

Parameters

ParameterTypeDescription
labelLThe label of the data item to get.
indexIThe index of the data item to get.

Returns

Subscribable<Readonly<DataItem<R[L]>>>

A subscribable for the requested data item.