From 3c5479e0009333190e9db8acb24f470796cf0dd1 Mon Sep 17 00:00:00 2001 From: kozbial Date: Fri, 16 Jul 2021 11:07:34 -0700 Subject: [PATCH] Migrate core/component_manager.js named requires --- core/component_manager.js | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/core/component_manager.js b/core/component_manager.js index fbf66d544..cbc4baa60 100644 --- a/core/component_manager.js +++ b/core/component_manager.js @@ -14,11 +14,11 @@ goog.module('Blockly.ComponentManager'); goog.module.declareLegacyNamespace(); -goog.requireType('Blockly.IAutoHideable'); -goog.requireType('Blockly.IComponent'); -goog.requireType('Blockly.IDeleteArea'); -goog.requireType('Blockly.IDragTarget'); -goog.requireType('Blockly.IPositionable'); +const IAutoHideable = goog.requireType('Blockly.IAutoHideable'); +const IComponent = goog.requireType('Blockly.IComponent'); +const IDeleteArea = goog.requireType('Blockly.IDeleteArea'); +const IDragTarget = goog.requireType('Blockly.IDragTarget'); +const IPositionable = goog.requireType('Blockly.IPositionable'); /** @@ -44,9 +44,9 @@ const ComponentManager = function() { /** * An object storing component information. * @typedef {{ - * component: !Blockly.IComponent, + * component: !IComponent, * capabilities: ( - * !Array> + * !Array> * ), * weight: number * }} @@ -162,7 +162,7 @@ ComponentManager.prototype.hasCapability = function(id, capability) { /** * Gets the component with the given ID. * @param {string} id The ID of the component to get. - * @return {!Blockly.IComponent|undefined} The component with the given name + * @return {!IComponent|undefined} The component with the given name * or undefined if not found. */ ComponentManager.prototype.getComponent = function(id) { @@ -228,19 +228,19 @@ ComponentManager.Capability.prototype.toString = function() { return this.name_; }; -/** @type {!ComponentManager.Capability} */ +/** @type {!ComponentManager.Capability} */ ComponentManager.Capability.POSITIONABLE = new ComponentManager.Capability('positionable'); -/** @type {!ComponentManager.Capability} */ +/** @type {!ComponentManager.Capability} */ ComponentManager.Capability.DRAG_TARGET = new ComponentManager.Capability('drag_target'); -/** @type {!ComponentManager.Capability} */ +/** @type {!ComponentManager.Capability} */ ComponentManager.Capability.DELETE_AREA = new ComponentManager.Capability('delete_area'); -/** @type {!ComponentManager.Capability} */ +/** @type {!ComponentManager.Capability} */ ComponentManager.Capability.AUTOHIDEABLE = new ComponentManager.Capability('autohideable');