From cca88beb30154c6f8be46fcafd0a0eb29c5866c4 Mon Sep 17 00:00:00 2001 From: Allison Lamm Date: Mon, 10 Aug 2015 13:46:16 -0500 Subject: [PATCH 1/2] adding type annotation to field text input --- core/field_textinput.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/field_textinput.js b/core/field_textinput.js index dd84752c1..7fdc1d047 100644 --- a/core/field_textinput.js +++ b/core/field_textinput.js @@ -126,6 +126,7 @@ Blockly.FieldTextInput.prototype.showEditor_ = function(opt_quietInput) { // Create the input. var htmlInput = goog.dom.createDom('input', 'blocklyHtmlInput'); htmlInput.setAttribute('spellcheck', this.spellcheck_); + /** @type {!HTMLInputElement} */ Blockly.FieldTextInput.htmlInput_ = htmlInput; div.appendChild(htmlInput); @@ -200,7 +201,7 @@ Blockly.FieldTextInput.prototype.onHtmlInputChange_ = function(e) { Blockly.FieldTextInput.prototype.validate_ = function() { var valid = true; goog.asserts.assertObject(Blockly.FieldTextInput.htmlInput_); - var htmlInput = /** @type {!Element} */ (Blockly.FieldTextInput.htmlInput_); + var htmlInput = Blockly.FieldTextInput.htmlInput_; if (this.sourceBlock_ && this.changeHandler_) { valid = this.changeHandler_(htmlInput.value); } From 6070b9473d2d30d157486ae05f21638447640826 Mon Sep 17 00:00:00 2001 From: Allison Lamm Date: Mon, 10 Aug 2015 14:17:11 -0500 Subject: [PATCH 2/2] Update type annotation for Blockly cursor --- core/css.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/css.js b/core/css.js index c5f22e8c9..d1e7b8692 100644 --- a/core/css.js +++ b/core/css.js @@ -92,7 +92,7 @@ Blockly.Css.inject = function(hasCss, pathToMedia) { /** * Set the cursor to be displayed when over something draggable. - * @param {Blockly.Cursor} cursor Enum. + * @param {Blockly.Css.Cursor} cursor Enum. */ Blockly.Css.setCursor = function(cursor) { if (Blockly.Css.currentCursor_ == cursor) {