Dispose makes the types we use inconsistent. Suppress checkTypes in dispose. (#3336)

This commit is contained in:
Sam El-Husseini
2019-10-24 15:47:42 -04:00
committed by GitHub
parent 649dc116ed
commit bfe62f98ca
9 changed files with 9 additions and 0 deletions

View File

@@ -313,6 +313,7 @@ Blockly.Block.prototype.getDeveloperVariables;
* @param {boolean} healStack If true, then try to heal any gap by connecting
* the next statement with the previous statement. Otherwise, dispose of
* all children of this block.
* @suppress {checkTypes}
*/
Blockly.Block.prototype.dispose = function(healStack) {
if (!this.workspace) {

View File

@@ -1009,6 +1009,7 @@ Blockly.BlockSvg.prototype.getSvgRoot = function() {
* the next statement with the previous statement. Otherwise, dispose of
* all children of this block.
* @param {boolean=} animate If true, show a disposal animation and sound.
* @suppress {checkTypes}
*/
Blockly.BlockSvg.prototype.dispose = function(healStack, animate) {
if (!this.workspace) {

View File

@@ -92,6 +92,7 @@ Blockly.BubbleDragger = function(bubble, workspace) {
/**
* Sever all links from this object.
* @package
* @suppress {checkTypes}
*/
Blockly.BubbleDragger.prototype.dispose = function() {
this.draggingBubble_ = null;

View File

@@ -276,6 +276,7 @@ Blockly.Flyout.prototype.init = function(targetWorkspace) {
/**
* Dispose of this flyout.
* Unlink from all DOM elements to prevent memory leaks.
* @suppress {checkTypes}
*/
Blockly.Flyout.prototype.dispose = function() {
this.hide();

View File

@@ -92,6 +92,7 @@ Blockly.Grid.prototype.scale_ = 1;
/**
* Dispose of this grid and unlink from the DOM.
* @package
* @suppress {checkTypes}
*/
Blockly.Grid.prototype.dispose = function() {
this.gridPattern_ = null;

View File

@@ -258,6 +258,7 @@ Blockly.Input.prototype.init = function() {
/**
* Sever all links to this input.
* @suppress {checkTypes}
*/
Blockly.Input.prototype.dispose = function() {
for (var i = 0, field; field = this.fieldRow[i]; i++) {

View File

@@ -303,6 +303,7 @@ Blockly.Trashcan.prototype.init = function(verticalSpacing) {
/**
* Dispose of this trash can.
* Unlink from all DOM elements to prevent memory leaks.
* @suppress {checkTypes}
*/
Blockly.Trashcan.prototype.dispose = function() {
if (this.svgGroup_) {

View File

@@ -55,6 +55,7 @@ Blockly.WorkspaceDragger = function(workspace) {
/**
* Sever all links from this object.
* @package
* @suppress {checkTypes}
*/
Blockly.WorkspaceDragger.prototype.dispose = function() {
this.workspace_ = null;

View File

@@ -680,6 +680,7 @@ Blockly.WorkspaceSvg.prototype.createDom = function(opt_backgroundClass) {
/**
* Dispose of this workspace.
* Unlink from all DOM elements to prevent memory leaks.
* @suppress {checkTypes}
*/
Blockly.WorkspaceSvg.prototype.dispose = function() {
// Stop rerendering.