Resolve remaining compiler type warnings (#3334)

* Resolve remaining compiler warnings with inconsistent types.
This commit is contained in:
Sam El-Husseini
2019-10-25 19:07:17 -04:00
committed by GitHub
parent ae1a41fd20
commit 759875a6c0
12 changed files with 37 additions and 32 deletions

View File

@@ -64,14 +64,15 @@ Blockly.Grid = function(pattern, options) {
* @type {SVGElement}
* @private
*/
this.line1_ = pattern.firstChild;
this.line1_ = /** @type {SVGElement} */ (pattern.firstChild);
/**
* The vertical grid line, if it exists.
* @type {SVGElement}
* @private
*/
this.line2_ = this.line1_ && this.line1_.nextSibling;
this.line2_ = this.line1_ &&
(/** @type {SVGElement} */ (this.line1_.nextSibling));
/**
* Whether blocks should snap to the grid.
@@ -154,7 +155,7 @@ Blockly.Grid.prototype.update = function(scale) {
/**
* Set the attributes on one of the lines in the grid. Use this to update the
* length and stroke width of the grid lines.
* @param {!SVGElement} line Which line to update.
* @param {SVGElement} line Which line to update.
* @param {number} width The new stroke size (in px).
* @param {number} x1 The new x start position of the line (in px).
* @param {number} x2 The new x end position of the line (in px).