Skip to main content

Interface: IVariableBackedParameterModel

Defined in: packages/blockly/core/interfaces/i_variable_backed_parameter_model.ts:11

Interface for a parameter model that holds a variable model.

Extends​

Methods index​

MethodDescription
setNameSets the name of this parameter to the given name.
setTypesSets the types of this parameter to the given type.
getNameReturns the name of this parameter.
getTypesReturn the types of this parameter.
getIdReturns the unique language-neutral ID for the parameter.
setProcedureModelSets the procedure model this parameter is associated with.
saveStateSerializes the state of the parameter to JSON.
getVariableModelReturns the variable model held by this type.

Methods​

setName()​

setName(name): this;

Defined in: packages/blockly/core/interfaces/i_parameter_model.ts:17

Sets the name of this parameter to the given name.

Parameters​

ParameterType
namestring

Returns​

this

Inherited from​

IParameterModel.setName


setTypes()​

setTypes(types): this;

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

Sets the types of this parameter to the given type.

Parameters​

ParameterType
typesstring[]

Returns​

this

Inherited from​

IParameterModel.setTypes


getName()​

getName(): string;

Defined in: packages/blockly/core/interfaces/i_parameter_model.ts:27

Returns the name of this parameter.

Returns​

string

Inherited from​

IParameterModel.getName


getTypes()​

getTypes(): string[];

Defined in: packages/blockly/core/interfaces/i_parameter_model.ts:32

Return the types of this parameter.

Returns​

string[]

Inherited from​

IParameterModel.getTypes


getId()​

getId(): string;

Defined in: packages/blockly/core/interfaces/i_parameter_model.ts:40

Returns the unique language-neutral ID for the parameter.

This represents the identify of the variable model which does not change over time.

Returns​

string

Inherited from​

IParameterModel.getId


setProcedureModel()​

setProcedureModel(model): this;

Defined in: packages/blockly/core/interfaces/i_parameter_model.ts:43

Sets the procedure model this parameter is associated with.

Parameters​

ParameterType
modelIProcedureModel

Returns​

this

Inherited from​

IParameterModel.setProcedureModel


saveState()​

saveState(): ParameterState;

Defined in: packages/blockly/core/interfaces/i_parameter_model.ts:50

Serializes the state of the parameter to JSON.

Returns​

ParameterState

JSON serializable state of the parameter.

Inherited from​

IParameterModel.saveState


getVariableModel()​

getVariableModel(): IVariableModel<IVariableState>;

Defined in: packages/blockly/core/interfaces/i_variable_backed_parameter_model.ts:13

Returns the variable model held by this type.

Returns​

IVariableModel<IVariableState>