@yantrix/automata v0.6.0 • Docs
Yantrix API / @yantrix/automata / TStorageBinding
Type Alias: TStorageBinding<ModelType, SnapshotType> ​
ts
type TStorageBinding<ModelType, SnapshotType>: object;Maps one Storage snapshot to and from its owned Data Model projection.
Type Parameters ​
• ModelType extends object
• SnapshotType = unknown
Type declaration ​
hydrate() ​
ts
hydrate: (model, snapshot) => ModelType;Parameters ​
• model: Readonly<ModelType>
• snapshot: SnapshotType
Returns ​
ModelType
select() ​
ts
select: (model) => SnapshotType;Parameters ​
• model: Readonly<ModelType>
Returns ​
SnapshotType
storage ​
ts
storage: IStorageAdapter<SnapshotType>;