From b990eb08a3021f9cdc71f3325e31774507ee0b75 Mon Sep 17 00:00:00 2001 From: kozbial Date: Fri, 16 Jul 2021 16:15:15 -0700 Subject: [PATCH] Migrate core/interfaces/i_styleable.js to goog.module --- core/interfaces/i_styleable.js | 11 +++++++---- tests/deps.js | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/core/interfaces/i_styleable.js b/core/interfaces/i_styleable.js index 944ee9d65..14dea3ce1 100644 --- a/core/interfaces/i_styleable.js +++ b/core/interfaces/i_styleable.js @@ -11,23 +11,26 @@ 'use strict'; -goog.provide('Blockly.IStyleable'); +goog.module('Blockly.IStyleable'); +goog.module.declareLegacyNamespace(); /** * Interface for an object that a style can be added to. * @interface */ -Blockly.IStyleable = function() {}; +const IStyleable = function() {}; /** * Adds a style on the toolbox. Usually used to change the cursor. * @param {string} style The name of the class to add. */ -Blockly.IStyleable.prototype.addStyle; +IStyleable.prototype.addStyle; /** * Removes a style from the toolbox. Usually used to change the cursor. * @param {string} style The name of the class to remove. */ -Blockly.IStyleable.prototype.removeStyle; +IStyleable.prototype.removeStyle; + +exports = IStyleable; diff --git a/tests/deps.js b/tests/deps.js index 3ce0457fb..c9ef15a2f 100644 --- a/tests/deps.js +++ b/tests/deps.js @@ -93,7 +93,7 @@ goog.addDependency('../../core/interfaces/i_positionable.js', ['Blockly.IPositio goog.addDependency('../../core/interfaces/i_registrable.js', ['Blockly.IRegistrable'], []); goog.addDependency('../../core/interfaces/i_registrable_field.js', ['Blockly.IRegistrableField'], []); goog.addDependency('../../core/interfaces/i_selectable.js', ['Blockly.ISelectable'], []); -goog.addDependency('../../core/interfaces/i_styleable.js', ['Blockly.IStyleable'], []); +goog.addDependency('../../core/interfaces/i_styleable.js', ['Blockly.IStyleable'], [], {'lang': 'es6', 'module': 'goog'}); goog.addDependency('../../core/interfaces/i_toolbox.js', ['Blockly.IToolbox'], []); goog.addDependency('../../core/interfaces/i_toolbox_item.js', ['Blockly.ICollapsibleToolboxItem', 'Blockly.ISelectableToolboxItem', 'Blockly.IToolboxItem'], []); goog.addDependency('../../core/keyboard_nav/ast_node.js', ['Blockly.ASTNode'], ['Blockly.connectionTypes', 'Blockly.constants', 'Blockly.utils.Coordinate'], {'lang': 'es5'});