The type of the data held in the block.
The type of the data's keys.
The type of the data's ID.
For observers. The type of instances that react to changes in the block.
For observers. The type of the data associated with each observer instance.
The type of the data held in the block.
The type of the data's keys.
The type of the data's ID.
For observers. The type of instances that react to changes in the block.
For observers. The type of the data associated with each observer instance.
Optionalproperties: DataBlockProperties = {}Optional initialization properties.
ProtectedisProtected ReadonlychangeReadonlyonDelegate fired when the value changes at a certain key/index.
The default class of observers to instantiate.
The default class of observers to instantiate.
The block's values in an array (in the order implied by keys).
Functionget
The key/index to read.
undefined if not present.Functionset
The key/index to write.
The value to set.
Functionadd
The value to insert.
Optionalkey: KeyTypeOptional numeric index to insert at. If omitted, the value is pushed.
Append or insert a value into an array-backed data block. If the block is not an array, the call forwards to set.
Functionlink
The host to attach.
FunctiongenerateObserver
Optionalproperties: TurboObserverProperties<DataEntryType, ComponentType, KeyType> = {}Options for observer creation.
ProtectedkeyProtected FunctionkeyChanged
The key that changed.
Optionalvalue: unknown = ...The new value (or undefined for deletions).
Optionaldeleted: boolean = falseWhether the key was removed.
TurboDataBlock
Description
Lightweight wrapper around a plain JS container (object, Array or Map) that exposes a consistent API for reads/writes, signals, TurboObservers and host callbacks. Use this when you want change notifications and host integration around a simple data block.