Skip to main content

Interface: ISerializable

Defined in: packages/blockly/core/interfaces/i_serializable.ts:7

Methods index

MethodDescription
saveStateReturns a JSON serializable value that records the ISerializable's state.
loadStateTakes in a JSON serializable value and sets the ISerializable's state based on that.

Methods

saveState()

saveState(doFullSerialization): any;

Defined in: packages/blockly/core/interfaces/i_serializable.ts:14

Parameters

ParameterTypeDescription
doFullSerializationbooleanIf true, this signals that any backing data structures used by this ISerializable should also be serialized. This is used for copy-paste.

Returns

any

a JSON serializable value that records the ISerializable's state.


loadState()

loadState(state): void;

Defined in: packages/blockly/core/interfaces/i_serializable.ts:22

Takes in a JSON serializable value and sets the ISerializable's state based on that.

Parameters

ParameterTypeDescription
stateanyThe state to apply to the ISerializable.

Returns

void