Files
blockly/core/interfaces/i_parameter_model.ts
Beka Westberg fed57f24b7 fix: refactors concrete implementations of the procedure data models (#6575)
* fix: expand the IParameterModel interface

* fix: remove support for return types from the concrete procedure model

* feat: add an interface for the procedure map, and add getting procedures

* fix: add procedure map to workspace

* chore: format

* fix: add name parameter to procedure model to match parameter model

* chore: format

* chore: fix comments
2022-10-25 14:12:57 -07:00

46 lines
831 B
TypeScript

/**
* @license
* Copyright 2022 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
/**
* The interface for the data model of a procedure parameter.
*
* @namespace Blockly.IParameterModel
*/
/**
* A data model for a procedure.
*/
export interface IParameterModel {
/**
* Sets the name of this parameter to the given name.
*/
setName(name: string): this;
/**
* Sets the types of this parameter to the given type.
*/
setTypes(types: string[]): this;
/**
* Returns the name of this parameter.
*/
getName(): string;
/**
* Return the types of this parameter.
*/
getTypes(): string[];
/**
* Returns the unique language-neutral ID for the parameter.
*
* This represents the identify of the variable model which does not change
* over time.
*/
getId(): string;
}