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

@@ -363,7 +363,7 @@ Blockly.hideChaff = function(opt_allowToolbox) {
* @return {!Blockly.Workspace} The main workspace.
*/
Blockly.getMainWorkspace = function() {
return Blockly.mainWorkspace;
return /** @type {!Blockly.Workspace} */ (Blockly.mainWorkspace);
};
/**
@@ -396,7 +396,7 @@ Blockly.confirm = function(message, callback) {
* recommend testing mobile when overriding this.
* @param {string} message The message to display to the user.
* @param {string} defaultValue The value to initialize the prompt with.
* @param {!function(string)} callback The callback for handling user response.
* @param {!function(?string)} callback The callback for handling user response.
*/
Blockly.prompt = function(message, defaultValue, callback) {
callback(prompt(message, defaultValue));