mirror of
https://github.com/google/blockly.git
synced 2026-01-11 10:57:07 +01:00
Migrate core/utils/deprecation.js to goog.module
This commit is contained in:
@@ -15,7 +15,8 @@
|
||||
* @name Blockly.utils.deprecation
|
||||
* @namespace
|
||||
*/
|
||||
goog.provide('Blockly.utils.deprecation');
|
||||
goog.module('Blockly.utils.deprecation');
|
||||
goog.module.declareLegacyNamespace();
|
||||
|
||||
|
||||
/**
|
||||
@@ -29,7 +30,7 @@ goog.provide('Blockly.utils.deprecation');
|
||||
* if any.
|
||||
* @package
|
||||
*/
|
||||
Blockly.utils.deprecation.warn = function(
|
||||
const warn = function(
|
||||
name, deprecationDate, deletionDate, opt_use) {
|
||||
let msg = name + ' was deprecated on ' + deprecationDate +
|
||||
' and will be deleted on ' + deletionDate + '.';
|
||||
@@ -38,3 +39,5 @@ Blockly.utils.deprecation.warn = function(
|
||||
}
|
||||
console.warn(msg);
|
||||
};
|
||||
|
||||
exports = {warn};
|
||||
|
||||
@@ -172,7 +172,7 @@ goog.addDependency('../../core/utils.js', ['Blockly.utils'], ['Blockly.Msg', 'Bl
|
||||
goog.addDependency('../../core/utils/aria.js', ['Blockly.utils.aria'], []);
|
||||
goog.addDependency('../../core/utils/colour.js', ['Blockly.utils.colour'], []);
|
||||
goog.addDependency('../../core/utils/coordinate.js', ['Blockly.utils.Coordinate'], []);
|
||||
goog.addDependency('../../core/utils/deprecation.js', ['Blockly.utils.deprecation'], []);
|
||||
goog.addDependency('../../core/utils/deprecation.js', ['Blockly.utils.deprecation'], [], {'lang': 'es6', 'module': 'goog'});
|
||||
goog.addDependency('../../core/utils/dom.js', ['Blockly.utils.dom'], ['Blockly.utils.Svg', 'Blockly.utils.userAgent']);
|
||||
goog.addDependency('../../core/utils/global.js', ['Blockly.utils.global'], []);
|
||||
goog.addDependency('../../core/utils/idgenerator.js', ['Blockly.utils.IdGenerator'], []);
|
||||
|
||||
Reference in New Issue
Block a user