Skip to main content

Home > blockly > serialization > variables > VariableSerializer > save

serialization.variables.VariableSerializer.save() method

Serializes the variables of the given workspace.

Signature:

save(workspace: Workspace): IVariableState[] | null;

Parameters

ParameterTypeDescription
workspaceWorkspaceThe workspace to save the variables of.

Returns:

IVariableState[] | null

The state of the workspace's variables, or null if there are no variables.