blockly > serialization > procedures > ProcedureSerializer

serialization.procedures.ProcedureSerializer class

Serializer for saving and loading procedure state.


export declare class ProcedureSerializer<ProcedureModel extends IProcedureModel, ParameterModel extends IParameterModel> implements ISerializer 

Implements: ISerializer


Constructor Modifiers Description
(constructor)(procedureModelClass, parameterModelClass)

Constructs the procedure serializer.

Example usage: new ProcedureSerializer(MyProcedureModelClass, MyParameterModelClass)


Property Modifiers Type Description
priority number


Method Modifiers Description
clear(workspace) Disposes of any procedure models that exist on the workspace.
load(state, workspace) Deserializes the procedures models defined by the given state into the workspace.
save(workspace) Serializes the procedure models of the given workspace.