Fix JSDoc type annotations causing closure-make-deps warnings

Some type annotations were missing curly brackets, which makes
closure-make-deps emit uninteresting warnings.  Now any output
from the command will be informative and related to whatever
one is presently working on.
This commit is contained in:
Christopher Allen
2021-07-12 03:17:14 +01:00
parent 173ea2bc79
commit 1197afcee7
4 changed files with 16 additions and 15 deletions

View File

@@ -519,7 +519,7 @@ Blockly.Blocks['procedures_mutatorarg'] = {
* @param {string} varName User-supplied name.
* @return {?string} Valid name, or null if a name was not specified.
* @private
* @this Blockly.FieldTextInput
* @this {Blockly.FieldTextInput}
*/
validator_: function(varName) {
var sourceBlock = this.getSourceBlock();
@@ -571,7 +571,7 @@ Blockly.Blocks['procedures_mutatorarg'] = {
* variable name.
* @param {string} newText The new variable name.
* @private
* @this Blockly.FieldTextInput
* @this {Blockly.FieldTextInput}
*/
deleteIntermediateVars_: function(newText) {
var outerWs = Blockly.Mutator.findParentWs(this.getSourceBlock().workspace);

View File

@@ -191,7 +191,8 @@ Blockly.ContextMenuItems.addDeletableBlocks_ = function(block, deleteList) {
if (block.isDeletable()) {
Array.prototype.push.apply(deleteList, block.getDescendants(false));
} else {
var children = /** @type !Array<!Blockly.BlockSvg> */ (block.getChildren(false));
var children =
/** @type {!Array<!Blockly.BlockSvg>} */ (block.getChildren(false));
for (var i = 0; i < children.length; i++) {
Blockly.ContextMenuItems.addDeletableBlocks_(children[i], deleteList);
}

View File

@@ -158,7 +158,7 @@ Blockly.geras.RenderInfo.prototype.getInRowSpacing_ = function(prev, next) {
if (!prev) {
// Between an editable field and the beginning of the row.
if (next && Blockly.blockRendering.Types.isField(next) &&
(/** @type Blockly.blockRendering.Field */ (next)).isEditable) {
(/** @type {Blockly.blockRendering.Field} */ (next)).isEditable) {
return this.constants_.MEDIUM_PADDING;
}
// Inline input at the beginning of the row.
@@ -177,7 +177,7 @@ Blockly.geras.RenderInfo.prototype.getInRowSpacing_ = function(prev, next) {
Blockly.blockRendering.Types.isStatementInput(next))) {
// Between an editable field and the end of the row.
if (Blockly.blockRendering.Types.isField(prev) &&
(/** @type Blockly.blockRendering.Field */ (prev)).isEditable) {
(/** @type {Blockly.blockRendering.Field} */ (prev)).isEditable) {
return this.constants_.MEDIUM_PADDING;
}
// Padding at the end of an icon-only row to make the block shape clearer.
@@ -219,7 +219,7 @@ Blockly.geras.RenderInfo.prototype.getInRowSpacing_ = function(prev, next) {
next && Blockly.blockRendering.Types.isInput(next)) {
// Between an editable field and an input.
if (Blockly.blockRendering.Types.isField(prev) &&
(/** @type Blockly.blockRendering.Field */ (prev)).isEditable) {
(/** @type {Blockly.blockRendering.Field} */ (prev)).isEditable) {
if (Blockly.blockRendering.Types.isInlineInput(next)) {
return this.constants_.SMALL_PADDING;
} else if (Blockly.blockRendering.Types.isExternalInput(next)) {
@@ -247,7 +247,7 @@ Blockly.geras.RenderInfo.prototype.getInRowSpacing_ = function(prev, next) {
if (Blockly.blockRendering.Types.isInlineInput(prev) &&
next && Blockly.blockRendering.Types.isField(next)) {
// Editable field after inline input.
if ((/** @type Blockly.blockRendering.Field */ (next)).isEditable) {
if ((/** @type {Blockly.blockRendering.Field} */ (next)).isEditable) {
return this.constants_.MEDIUM_PADDING;
} else {
// Noneditable field after inline input.
@@ -288,8 +288,8 @@ Blockly.geras.RenderInfo.prototype.getInRowSpacing_ = function(prev, next) {
// Spacing between two fields of the same editability.
if (Blockly.blockRendering.Types.isField(prev) &&
next && Blockly.blockRendering.Types.isField(next) &&
((/** @type Blockly.blockRendering.Field */ (prev)).isEditable ==
(/** @type Blockly.blockRendering.Field */ (next)).isEditable)) {
((/** @type {Blockly.blockRendering.Field} */ (prev)).isEditable ==
(/** @type {Blockly.blockRendering.Field} */ (next)).isEditable)) {
return this.constants_.LARGE_PADDING;
}

View File

@@ -97,7 +97,7 @@ Blockly.thrasos.RenderInfo.prototype.getInRowSpacing_ = function(prev, next) {
if (!prev) {
// Between an editable field and the beginning of the row.
if (next && Blockly.blockRendering.Types.isField(next) &&
(/** @type Blockly.blockRendering.Field */ (next)).isEditable) {
(/** @type {Blockly.blockRendering.Field} */ (next)).isEditable) {
return this.constants_.MEDIUM_PADDING;
}
// Inline input at the beginning of the row.
@@ -115,7 +115,7 @@ Blockly.thrasos.RenderInfo.prototype.getInRowSpacing_ = function(prev, next) {
if (!Blockly.blockRendering.Types.isInput(prev) && !next) {
// Between an editable field and the end of the row.
if (Blockly.blockRendering.Types.isField(prev) &&
(/** @type Blockly.blockRendering.Field */ (prev)).isEditable) {
(/** @type {Blockly.blockRendering.Field} */ (prev)).isEditable) {
return this.constants_.MEDIUM_PADDING;
}
// Padding at the end of an icon-only row to make the block shape clearer.
@@ -157,7 +157,7 @@ Blockly.thrasos.RenderInfo.prototype.getInRowSpacing_ = function(prev, next) {
next && Blockly.blockRendering.Types.isInput(next)) {
// Between an editable field and an input.
if (Blockly.blockRendering.Types.isField(prev) &&
(/** @type Blockly.blockRendering.Field */ (prev)).isEditable) {
(/** @type {Blockly.blockRendering.Field} */ (prev)).isEditable) {
if (Blockly.blockRendering.Types.isInlineInput(next)) {
return this.constants_.SMALL_PADDING;
} else if (Blockly.blockRendering.Types.isExternalInput(next)) {
@@ -185,7 +185,7 @@ Blockly.thrasos.RenderInfo.prototype.getInRowSpacing_ = function(prev, next) {
if (Blockly.blockRendering.Types.isInlineInput(prev) &&
next && Blockly.blockRendering.Types.isField(next)) {
// Editable field after inline input.
if ((/** @type Blockly.blockRendering.Field */ (next)).isEditable) {
if ((/** @type {Blockly.blockRendering.Field} */ (next)).isEditable) {
return this.constants_.MEDIUM_PADDING;
} else {
// Noneditable field after inline input.
@@ -213,8 +213,8 @@ Blockly.thrasos.RenderInfo.prototype.getInRowSpacing_ = function(prev, next) {
// Spacing between two fields of the same editability.
if (Blockly.blockRendering.Types.isField(prev) &&
next && Blockly.blockRendering.Types.isField(next) &&
((/** @type Blockly.blockRendering.Field */ (prev)).isEditable ==
(/** @type Blockly.blockRendering.Field */ (next)).isEditable)) {
((/** @type {Blockly.blockRendering.Field} */ (prev)).isEditable ==
(/** @type {Blockly.blockRendering.Field} */ (next)).isEditable)) {
return this.constants_.LARGE_PADDING;
}