mirror of
https://github.com/google/blockly.git
synced 2026-01-11 10:57:07 +01:00
* feat: add the IVariableMap and IVariableModel interfaces. * chore: add license headers.
27 lines
643 B
TypeScript
27 lines
643 B
TypeScript
/**
|
|
* @license
|
|
* Copyright 2024 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
/* Representation of a variable. */
|
|
export interface IVariableModel {
|
|
/* Returns the unique ID of this variable. */
|
|
getId(): string;
|
|
|
|
/* Returns the user-visible name of this variable. */
|
|
getName(): string;
|
|
|
|
/**
|
|
* 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.
|
|
*/
|
|
getType(): string;
|
|
|
|
/* Sets the user-visible name of this variable. */
|
|
setName(name: string): this;
|
|
|
|
/* Sets the type of this variable. */
|
|
setType(type: string): this;
|
|
}
|