Misc JSDoc fixes. (#2747)

This commit is contained in:
Neil Fraser
2019-07-30 16:28:48 -07:00
committed by Sam El-Husseini
parent abc452109e
commit 6aedfab4d1
8 changed files with 10 additions and 10 deletions

View File

@@ -914,7 +914,7 @@ Blockly.Block.prototype.getColourBorder = function() {
var colour = this.getColour(); var colour = this.getColour();
return { return {
colourBorder: null, colourBorder: null,
colourLight: Blockly.utils.colour.blend('white',colour, 0.3), colourLight: Blockly.utils.colour.blend('white', colour, 0.3),
colourDark: Blockly.utils.colour.blend('black', colour, 0.2) colourDark: Blockly.utils.colour.blend('black', colour, 0.2)
}; };
}; };

View File

@@ -245,13 +245,13 @@ Blockly.FieldColour.COLUMNS = 7;
* Set a custom colour grid for this field. * Set a custom colour grid for this field.
* @param {Array.<string>} colours Array of colours for this block, * @param {Array.<string>} colours Array of colours for this block,
* or null to use default (Blockly.FieldColour.COLOURS). * or null to use default (Blockly.FieldColour.COLOURS).
* @param {Array.<string>} opt_titles Optional array of colour tooltips, * @param {Array.<string>=} opt_titles Optional array of colour tooltips,
* or null to use default (Blockly.FieldColour.TITLES). * or null to use default (Blockly.FieldColour.TITLES).
* @return {!Blockly.FieldColour} Returns itself (for method chaining). * @return {!Blockly.FieldColour} Returns itself (for method chaining).
*/ */
Blockly.FieldColour.prototype.setColours = function(colours, opt_titles) { Blockly.FieldColour.prototype.setColours = function(colours, opt_titles) {
this.colours_ = colours; this.colours_ = colours;
if (opt_titles !== undefined) { if (opt_titles) {
this.titles_ = opt_titles; this.titles_ = opt_titles;
} }
return this; return this;

View File

@@ -29,7 +29,7 @@ goog.require('Blockly.Cursor');
/** /**
* Class for a cursor. * Class for a cursor.
* @param {!Blockly.Workspace} workspace The workspace to sit in. * @param {!Blockly.Workspace} workspace The workspace to sit in.
* @param {?boolean} opt_isImmovable True if the cursor cannot be moved with * @param {boolean=} opt_isImmovable True if the cursor cannot be moved with
* calls to prev/next/in/out. This is called a marker. * calls to prev/next/in/out. This is called a marker.
* @extends {Blockly.Cursor} * @extends {Blockly.Cursor}
* @constructor * @constructor

View File

@@ -52,7 +52,7 @@ Blockly.utils.svgPaths.point = function(x, y) {
* These coordinates are unitless and hence in the user coordinate system. * These coordinates are unitless and hence in the user coordinate system.
* @param {string} command The command to use. * @param {string} command The command to use.
* Should be one of: c, C, s, S, q, Q. * Should be one of: c, C, s, S, q, Q.
* @param {string} points An array containing all of the points to pass to the * @param {!Array.<string>} points An array containing all of the points to pass to the
* curve command, in order. The points are represented as strings of the * curve command, in order. The points are represented as strings of the
* format ' x, y '. * format ' x, y '.
* @return {string} A string defining one or more Bezier curves. See the MDN * @return {string} A string defining one or more Bezier curves. See the MDN

View File

@@ -510,7 +510,7 @@ Blockly.Xml.domToBlock = function(xmlBlock, workspace) {
var swap = xmlBlock; var swap = xmlBlock;
// Closure Compiler complains here because the arguments are reversed. // Closure Compiler complains here because the arguments are reversed.
/** @suppress {checkTypes} */ /** @suppress {checkTypes} */
xmlBlock = workspace; xmlBlock = /** @type {!Element} */ (workspace);
workspace = swap; workspace = swap;
console.warn('Deprecated call to Blockly.Xml.domToBlock, ' + console.warn('Deprecated call to Blockly.Xml.domToBlock, ' +
'swap the arguments.'); 'swap the arguments.');

View File

@@ -49,8 +49,8 @@ BlockDefinitionExtractor.buildBlockFactoryWorkspace = function(block) {
* inner text. * inner text.
* *
* @param {string} name New element tag name. * @param {string} name New element tag name.
* @param {Map<String,String>} opt_attrs Optional list of attributes. * @param {!Object.<string, string>=} opt_attrs Optional list of attributes.
* @param {string?} opt_text Optional inner text. * @param {string=} opt_text Optional inner text.
* @return {!Element} The newly created element. * @return {!Element} The newly created element.
* @private * @private
*/ */

View File

@@ -36,7 +36,7 @@
* Block Library Controller Class * Block Library Controller Class
* @param {string} blockLibraryName Desired name of Block Library, also used * @param {string} blockLibraryName Desired name of Block Library, also used
* to create the key for where it's stored in local storage. * to create the key for where it's stored in local storage.
* @param {!BlockLibraryStorage} opt_blockLibraryStorage Optional storage * @param {!BlockLibraryStorage=} opt_blockLibraryStorage Optional storage
* object that allows user to import a block library. * object that allows user to import a block library.
* @constructor * @constructor
*/ */

View File

@@ -31,7 +31,7 @@
* Represents a block library's storage. * Represents a block library's storage.
* @param {string} blockLibraryName Desired name of Block Library, also used * @param {string} blockLibraryName Desired name of Block Library, also used
* to create the key for where it's stored in local storage. * to create the key for where it's stored in local storage.
* @param {Object} opt_blocks Object mapping block type to XML. * @param {!Object=} opt_blocks Object mapping block type to XML.
* @constructor * @constructor
*/ */
function BlockLibraryStorage(blockLibraryName, opt_blocks) { function BlockLibraryStorage(blockLibraryName, opt_blocks) {