LocalValueMaker Class
A LocalValueMaker enables a container type DDS to produce and store local values with minimal awareness of how those objects are stored, serialized, and deserialized.
Signature
export declare class LocalValueMaker
Constructors
Constructor | Description |
---|---|
(constructor)(serializer) | Create a new LocalValueMaker. |
Methods
Method | Return Type | Description |
---|---|---|
fromInMemory(value) | ILocalValue | Create a new local value containing a given plain object. |
fromSerializable(serializable) | ILocalValue | Create a new local value from an incoming serialized value. |
Constructor Details
(constructor)
Create a new LocalValueMaker.
Signature
constructor(serializer: IFluidSerializer);
Parameters
Parameter | Type | Description |
---|---|---|
serializer | IFluidSerializer | The serializer to serialize / parse handles. |
Method Details
fromInMemory
Create a new local value containing a given plain object.
Signature
fromInMemory(value: any): ILocalValue;
Parameters
Parameter | Type | Description |
---|---|---|
value | any | The value to store |
Returns
An ILocalValue containing the value
Return type: ILocalValue
fromSerializable
Create a new local value from an incoming serialized value.
Signature
fromSerializable(serializable: ISerializableValue): ILocalValue;
Parameters
Parameter | Type | Description |
---|---|---|
serializable | ISerializableValue | The serializable value to make local |
Returns
Return type: ILocalValue