From a131794ef09cef79d8012c143a7f12d679b1ef5b Mon Sep 17 00:00:00 2001 From: Halit Anil Donmez Date: Wed, 7 Oct 2020 16:16:27 -0400 Subject: [PATCH] add deprecation warning (#4356) * add deprecation warning * fix indent and update deprecation date --- core/field_textinput.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/field_textinput.js b/core/field_textinput.js index 4bd367f37..bd544f08c 100644 --- a/core/field_textinput.js +++ b/core/field_textinput.js @@ -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; }