From 00bb99e0ffe2520b4a7d6a56961ef51ee44dd6c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Vr=C3=A1na?= Date: Mon, 16 Mar 2020 16:14:47 +0100 Subject: [PATCH] Add non-nullable modifier to return type of functions never returning null (#3742) --- blocks/lists.js | 6 +++--- blocks/math.js | 4 ++-- core/extensions.js | 4 ++-- core/flyout_base.js | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/blocks/lists.js b/blocks/lists.js index b995b40f1..44167685e 100644 --- a/blocks/lists.js +++ b/blocks/lists.js @@ -401,7 +401,7 @@ Blockly.Blocks['lists_getIndex'] = { /** * Create XML to represent whether the block is a statement or a value. * Also represent whether there is an 'AT' input. - * @return {Element} XML storage element. + * @return {!Element} XML storage element. * @this {Blockly.Block} */ mutationToDom: function() { @@ -565,7 +565,7 @@ Blockly.Blocks['lists_setIndex'] = { }, /** * Create XML to represent whether there is an 'AT' input. - * @return {Element} XML storage element. + * @return {!Element} XML storage element. * @this {Blockly.Block} */ mutationToDom: function() { @@ -663,7 +663,7 @@ Blockly.Blocks['lists_getSublist'] = { }, /** * Create XML to represent whether there are 'AT' inputs. - * @return {Element} XML storage element. + * @return {!Element} XML storage element. * @this {Blockly.Block} */ mutationToDom: function() { diff --git a/blocks/math.js b/blocks/math.js index e772edfb4..3583d8d23 100644 --- a/blocks/math.js +++ b/blocks/math.js @@ -446,7 +446,7 @@ Blockly.Extensions.register('math_op_tooltip', Blockly.Constants.Math.IS_DIVISIBLEBY_MUTATOR_MIXIN = { /** * Create XML to represent whether the 'divisorInput' should be present. - * @return {Element} XML storage element. + * @return {!Element} XML storage element. * @this {Blockly.Block} */ mutationToDom: function() { @@ -531,7 +531,7 @@ Blockly.Constants.Math.LIST_MODES_MUTATOR_MIXIN = { }, /** * Create XML to represent the output type. - * @return {Element} XML storage element. + * @return {!Element} XML storage element. * @this {Blockly.Block} */ mutationToDom: function() { diff --git a/core/extensions.js b/core/extensions.js index 6edd7483d..df76c6f91 100644 --- a/core/extensions.js +++ b/core/extensions.js @@ -317,7 +317,7 @@ Blockly.Extensions.mutatorPropertiesMatch_ = function(oldProperties, block) { * to the lookup table. * @param {!Object.} lookupTable The table of field values to * tooltip text. - * @return {Function} The extension function. + * @return {!Function} The extension function. */ Blockly.Extensions.buildTooltipForDropdown = function(dropdownName, lookupTable) { @@ -401,7 +401,7 @@ Blockly.Extensions.checkDropdownOptionsInTable_ = function(block, dropdownName, * @param {string} msgTemplate The template form to of the message text, with * %1 placeholder. * @param {string} fieldName The field with the replacement text. - * @return {Function} The extension function. + * @return {!Function} The extension function. */ Blockly.Extensions.buildTooltipWithFieldText = function(msgTemplate, fieldName) { diff --git a/core/flyout_base.js b/core/flyout_base.js index 6d175bcf8..3c7729b05 100644 --- a/core/flyout_base.js +++ b/core/flyout_base.js @@ -630,7 +630,7 @@ Blockly.Flyout.prototype.isBlockCreatable_ = function(block) { /** * Create a copy of this block on the workspace. * @param {!Blockly.BlockSvg} originalBlock The block to copy from the flyout. - * @return {Blockly.BlockSvg} The newly created block, or null if something + * @return {!Blockly.BlockSvg} The newly created block, or null if something * went wrong with deserialization. * @package */