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 commit d6d8656a45.

* 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 commit 173455588a.

* 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:
Maribeth Bottorff
2022-08-23 14:27:22 -07:00
committed by GitHub
parent bb37d1b7aa
commit 037eb59b89
261 changed files with 3876 additions and 2341 deletions

View File

@@ -4,10 +4,6 @@
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @fileoverview Utility functions for handling typed variables.
*/
/**
* Utility functions for handling typed variables.
*
@@ -31,16 +27,28 @@ import type {WorkspaceSvg} from './workspace_svg.js';
* variable blocks.
* See also Blockly.Variables.CATEGORY_NAME and
* Blockly.Procedures.CATEGORY_NAME.
*
* @alias Blockly.VariablesDynamic.CATEGORY_NAME
*/
export const CATEGORY_NAME = 'VARIABLE_DYNAMIC';
/**
* Click handler for a button that creates String variables.
*
* @param button
*/
function stringButtonClickHandler(button: AnyDuringMigration) {
Variables.createVariableButtonHandler(
button.getTargetWorkspace(), undefined, 'String');
}
// eslint-disable-next-line camelcase
export const onCreateVariableButtonClick_String = stringButtonClickHandler;
/**
* Click handler for a button that creates Number variables.
*
* @param button
*/
function numberButtonClickHandler(button: AnyDuringMigration) {
Variables.createVariableButtonHandler(
button.getTargetWorkspace(), undefined, 'Number');
@@ -48,6 +56,11 @@ function numberButtonClickHandler(button: AnyDuringMigration) {
// eslint-disable-next-line camelcase
export const onCreateVariableButtonClick_Number = numberButtonClickHandler;
/**
* Click handler for a button that creates Colour variables.
*
* @param button
*/
function colourButtonClickHandler(button: AnyDuringMigration) {
Variables.createVariableButtonHandler(
button.getTargetWorkspace(), undefined, 'Colour');
@@ -58,8 +71,9 @@ export const onCreateVariableButtonClick_Colour = colourButtonClickHandler;
/**
* Construct the elements (blocks and button) required by the flyout for the
* variable category.
*
* @param workspace The workspace containing variables.
* @return Array of XML elements.
* @returns Array of XML elements.
* @alias Blockly.VariablesDynamic.flyoutCategory
*/
export function flyoutCategory(workspace: WorkspaceSvg): Element[] {
@@ -93,8 +107,9 @@ export function flyoutCategory(workspace: WorkspaceSvg): Element[] {
/**
* Construct the blocks required by the flyout for the variable category.
*
* @param workspace The workspace containing variables.
* @return Array of XML block elements.
* @returns Array of XML block elements.
* @alias Blockly.VariablesDynamic.flyoutCategoryBlocks
*/
export function flyoutCategoryBlocks(workspace: Workspace): Element[] {