From 8f83073cdb9f859109257a933792d6e527f05e68 Mon Sep 17 00:00:00 2001 From: kozbial Date: Tue, 10 Aug 2021 14:48:28 -0700 Subject: [PATCH] Migrate core/renderers/geras/measurables/input.js named requires --- .../geras/measurables/inline_input.js | 20 +++++++++---------- .../geras/measurables/statement_input.js | 20 +++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/core/renderers/geras/measurables/inline_input.js b/core/renderers/geras/measurables/inline_input.js index f8f4c6b9c..95c97afd0 100644 --- a/core/renderers/geras/measurables/inline_input.js +++ b/core/renderers/geras/measurables/inline_input.js @@ -14,23 +14,24 @@ goog.module('Blockly.geras.InlineInput'); goog.module.declareLegacyNamespace(); -goog.require('Blockly.blockRendering.InlineInput'); -goog.require('Blockly.utils.object'); - -goog.requireType('Blockly.blockRendering.ConstantProvider'); -goog.requireType('Blockly.Input'); +const BaseInlineInput = goog.require('Blockly.blockRendering.InlineInput'); +/* eslint-disable-next-line no-unused-vars */ +const ConstantProvider = goog.requireType('Blockly.blockRendering.ConstantProvider'); +/* eslint-disable-next-line no-unused-vars */ +const Input = goog.requireType('Blockly.Input'); +const object = goog.require('Blockly.utils.object'); /** * An object containing information about the space an inline input takes up * during rendering - * @param {!Blockly.blockRendering.ConstantProvider} constants The rendering + * @param {!ConstantProvider} constants The rendering * constants provider. - * @param {!Blockly.Input} input The inline input to measure and store + * @param {!Input} input The inline input to measure and store * information for. * @package * @constructor - * @extends {Blockly.blockRendering.InlineInput} + * @extends {BaseInlineInput} */ const InlineInput = function(constants, input) { InlineInput.superClass_.constructor.call( @@ -43,7 +44,6 @@ const InlineInput = function(constants, input) { this.height += this.constants_.DARK_PATH_OFFSET; } }; -Blockly.utils.object.inherits(InlineInput, - Blockly.blockRendering.InlineInput); +object.inherits(InlineInput, BaseInlineInput); exports = InlineInput; diff --git a/core/renderers/geras/measurables/statement_input.js b/core/renderers/geras/measurables/statement_input.js index 289c0004a..1ebbcaab0 100644 --- a/core/renderers/geras/measurables/statement_input.js +++ b/core/renderers/geras/measurables/statement_input.js @@ -14,23 +14,24 @@ goog.module('Blockly.geras.StatementInput'); goog.module.declareLegacyNamespace(); -goog.require('Blockly.blockRendering.StatementInput'); -goog.require('Blockly.utils.object'); - -goog.requireType('Blockly.blockRendering.ConstantProvider'); -goog.requireType('Blockly.Input'); +const BaseStatementInput = goog.require('Blockly.blockRendering.StatementInput'); +/* eslint-disable-next-line no-unused-vars */ +const ConstantProvider = goog.requireType('Blockly.blockRendering.ConstantProvider'); +/* eslint-disable-next-line no-unused-vars */ +const Input = goog.requireType('Blockly.Input'); +const object = goog.require('Blockly.utils.object'); /** * An object containing information about the space a statement input takes up * during rendering - * @param {!Blockly.blockRendering.ConstantProvider} constants The rendering + * @param {!ConstantProvider} constants The rendering * constants provider. - * @param {!Blockly.Input} input The statement input to measure and store + * @param {!Input} input The statement input to measure and store * information for. * @package * @constructor - * @extends {Blockly.blockRendering.StatementInput} + * @extends {BaseStatementInput} */ const StatementInput = function(constants, input) { StatementInput.superClass_.constructor.call( @@ -42,7 +43,6 @@ const StatementInput = function(constants, input) { this.height += this.constants_.DARK_PATH_OFFSET; } }; -Blockly.utils.object.inherits(StatementInput, - Blockly.blockRendering.StatementInput); +object.inherits(StatementInput, BaseStatementInput); exports = StatementInput;