add deprecation warning (#4356)

* add deprecation warning

* fix indent and update deprecation date
This commit is contained in:
Halit Anil Donmez
2020-10-07 16:16:27 -04:00
committed by GitHub
parent 3f88a3f193
commit a131794ef0

View File

@@ -531,8 +531,11 @@ Blockly.FieldTextInput.prototype.resizeEditor_ = function() {
* @deprecated
*/
Blockly.FieldTextInput.numberValidator = function(text) {
console.warn('Blockly.FieldTextInput.numberValidator is deprecated. ' +
'Use Blockly.FieldNumber instead.');
Blockly.utils.deprecation.warn(
'FieldTextInput.numberValidator',
'May 2019',
'December 2020',
'Blockly.FieldNumber');
if (text === null) {
return null;
}