mirror of
https://github.com/google/blockly.git
synced 2026-01-05 08:00:09 +01:00
chore: Lint TsDoc. (#6353)
* chore: add linting for tsdoc * chore: don't require types on return * chore: remove redundant fileoverview from ts * chore: change return to returns and add some newlines * chore: remove license tag * chore: don't require params/return docs * chore: remove spurious struct tags * Revert "chore: change return to returns and add some newlines" This reverts commitd6d8656a45. * chore: don't auto-add param names * chore: disable require-param bc it breaks on this * return to returns and add line breaks * chore: configure additional jsdoc rules * chore: run format * Revert "chore: remove license tag" This reverts commit173455588a. * chore: allow license tag format * chore: only require jsdoc on exported items * chore: add missing jsdoc or silence where needed * chore: run format * chore: lint fixes
This commit is contained in:
committed by
GitHub
parent
bb37d1b7aa
commit
037eb59b89
@@ -4,12 +4,9 @@
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Components for the variable model.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Components for the variable model.
|
||||
*
|
||||
* @class
|
||||
*/
|
||||
import * as goog from '../closure/goog/goog.js';
|
||||
@@ -26,6 +23,7 @@ import type {Workspace} from './workspace.js';
|
||||
/**
|
||||
* Class for a variable model.
|
||||
* Holds information for the variable including name, ID, and type.
|
||||
*
|
||||
* @see {Blockly.FieldVariable}
|
||||
* @alias Blockly.VariableModel
|
||||
*/
|
||||
@@ -49,6 +47,7 @@ export class VariableModel {
|
||||
* The type of the variable, such as 'int' or 'sound_effect'. This may be
|
||||
* used to build a list of variables of a specific type. By default this is
|
||||
* the empty string '', which is a specific type.
|
||||
*
|
||||
* @see {Blockly.FieldVariable}
|
||||
*/
|
||||
this.type = opt_type || '';
|
||||
@@ -63,16 +62,17 @@ export class VariableModel {
|
||||
eventUtils.fire(new (eventUtils.get(eventUtils.VAR_CREATE))!(this));
|
||||
}
|
||||
|
||||
/** @return The ID for the variable. */
|
||||
/** @returns The ID for the variable. */
|
||||
getId(): string {
|
||||
return this.id_;
|
||||
}
|
||||
|
||||
/**
|
||||
* A custom compare function for the VariableModel objects.
|
||||
*
|
||||
* @param var1 First variable to compare.
|
||||
* @param var2 Second variable to compare.
|
||||
* @return -1 if name of var1 is less than name of var2, 0 if equal, and 1 if
|
||||
* @returns -1 if name of var1 is less than name of var2, 0 if equal, and 1 if
|
||||
* greater.
|
||||
* @internal
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user