Skip to main content

Interface: IVariableModel<T>

Defined in: packages/blockly/core/interfaces/i_variable_model.ts:10

Type Parameters

Type Parameter
T extends IVariableState

Methods index

MethodDescription
getId-
getName-
getTypeReturns the type of the variable like 'int' or 'string'. Does not need to be unique. This will default to '' which is a specific type.
setName-
setType-
getWorkspace-
save-

Methods

getId()

getId(): string;

Defined in: packages/blockly/core/interfaces/i_variable_model.ts:12

Returns

string


getName()

getName(): string;

Defined in: packages/blockly/core/interfaces/i_variable_model.ts:15

Returns

string


getType()

getType(): string;

Defined in: packages/blockly/core/interfaces/i_variable_model.ts:21

Returns the type of the variable like 'int' or 'string'. Does not need to be unique. This will default to '' which is a specific type.

Returns

string


setName()

setName(name): this;

Defined in: packages/blockly/core/interfaces/i_variable_model.ts:24

Parameters

ParameterType
namestring

Returns

this


setType()

setType(type): this;

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

Parameters

ParameterType
typestring

Returns

this


getWorkspace()

getWorkspace(): Workspace;

Defined in: packages/blockly/core/interfaces/i_variable_model.ts:29

Returns

Workspace


save()

save(): T;

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

Returns

T