Skip to main content

Interface: IParameterModel

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

A data model for a procedure.

Extended by

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.

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


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


getName()

getName(): string;

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

Returns the name of this parameter.

Returns

string


getTypes()

getTypes(): string[];

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

Return the types of this parameter.

Returns

string[]


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


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


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.