Skip to content

Commit e9de083

Browse files
committed
Fix @return JSDocs.
1 parent 68e134b commit e9de083

35 files changed

+67
-66
lines changed

blocks/text.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,7 @@ Blockly.Constants.Text.QUOTE_IMAGE_MIXIN = {
622622
* closing double quote. The selected quote will be adapted for RTL blocks.
623623
* @param {boolean} open If the image should be open quote (“ in LTR).
624624
* Otherwise, a closing quote is used (” in LTR).
625-
* @returns {!Blockly.FieldImage} The new field.
625+
* @return {!Blockly.FieldImage} The new field.
626626
* @this Blockly.Block
627627
*/
628628
newQuote_: function(open) {

core/block.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -814,7 +814,7 @@ Blockly.Block.prototype.setConnectionsHidden = function(hidden) {
814814
* Used to match connections between a block and its insertion marker.
815815
* @param {!Blockly.Block} otherBlock The other block to match against.
816816
* @param {!Blockly.Connection} conn The other connection to match.
817-
* @return {Blockly.Connection} the matching connection on this block, or null.
817+
* @return {Blockly.Connection} The matching connection on this block, or null.
818818
* @package
819819
*/
820820
Blockly.Block.prototype.getMatchingConnection = function(otherBlock, conn) {

core/block_dragger.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ Blockly.BlockDragger.prototype.fireMoveEvent_ = function() {
272272
/**
273273
* Shut the trash can and, if necessary, delete the dragging block.
274274
* Should be called at the end of a block drag.
275-
* @return {boolean} whether the block was deleted.
275+
* @return {boolean} Whether the block was deleted.
276276
* @private
277277
*/
278278
Blockly.BlockDragger.prototype.maybeDeleteBlock_ = function() {

core/block_svg.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -986,7 +986,7 @@ Blockly.BlockSvg.prototype.setBorderColour_ = function(rgb, colourTertiary) {
986986
* Sets the colour of shadow blocks.
987987
* @param {!string} rgb Primary colour of the block.
988988
* @param {?string} colourSecondary Colour for shadow block.
989-
* @return {!string} hexColour The background colour of the block.
989+
* @return {!string} The background colour of the block.
990990
*/
991991
Blockly.BlockSvg.prototype.setShadowColour_ = function(rgb, colourSecondary) {
992992
var hexColour;

core/blockly.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -745,7 +745,7 @@ Blockly.updateBlockStyles_ = function(blocks) {
745745

746746
/**
747747
* Gets the theme.
748-
* @return {?Blockly.Theme} theme Theme for Blockly.
748+
* @return {?Blockly.Theme} Theme for Blockly.
749749
*/
750750
Blockly.getTheme = function() {
751751
return this.theme_;

core/bubble.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ Blockly.Bubble.prototype.layoutBubble_ = function() {
462462
* @param {!number} relativeMin.y The y-position of the relativeMin.
463463
* @param {!Object} metrics The metrics of the workspace the bubble will
464464
* appear in.
465-
* @returns {number} The percentage of the bubble that is visible.
465+
* @return {number} The percentage of the bubble that is visible.
466466
* @private
467467
*/
468468
Blockly.Bubble.prototype.getOverlap_ = function(relativeMin, metrics) {
@@ -508,7 +508,7 @@ Blockly.Bubble.prototype.getOverlap_ = function(relativeMin, metrics) {
508508
* bubble is shown.
509509
* @param {!Object} metrics The metrics of the workspace the bubble will
510510
* appear in.
511-
* @returns {number} The optimal horizontal position of the top-left corner
511+
* @return {number} The optimal horizontal position of the top-left corner
512512
* of the bubble.
513513
* @private
514514
*/
@@ -566,7 +566,7 @@ Blockly.Bubble.prototype.getOptimalRelativeLeft_ = function(metrics) {
566566
* bubble is shown.
567567
* @param {!Object} metrics The metrics of the workspace the bubble will
568568
* appear in.
569-
* @returns {number} The optimal vertical position of the top-left corner
569+
* @return {number} The optimal vertical position of the top-left corner
570570
* of the bubble.
571571
* @private
572572
*/

core/bubble_dragger.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ Blockly.BubbleDragger.prototype.dragBubble = function(e, currentDragDeltaXY) {
151151
/**
152152
* Shut the trash can and, if necessary, delete the dragging bubble.
153153
* Should be called at the end of a bubble drag.
154-
* @return {boolean} whether the bubble was deleted.
154+
* @return {boolean} Whether the bubble was deleted.
155155
* @private
156156
*/
157157
Blockly.BubbleDragger.prototype.maybeDeleteBubble_ = function() {

core/connection.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,7 @@ Blockly.Connection.prototype.setShadowDom = function(shadow) {
674674

675675
/**
676676
* Return a connection's shadow block.
677-
* @return {Element} shadow DOM representation of a block or null.
677+
* @return {Element} Shadow DOM representation of a block or null.
678678
*/
679679
Blockly.Connection.prototype.getShadowDom = function() {
680680
return this.shadowDom_;

core/dragged_connection_manager.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ Blockly.DraggedConnectionManager.prototype.dispose = function() {
119119
/**
120120
* Return whether the block would be deleted if dropped immediately, based on
121121
* information from the most recent move event.
122-
* @return {boolean} true if the block would be deleted if dropped immediately.
122+
* @return {boolean} True if the block would be deleted if dropped immediately.
123123
* @package
124124
*/
125125
Blockly.DraggedConnectionManager.prototype.wouldDeleteBlock = function() {
@@ -129,7 +129,7 @@ Blockly.DraggedConnectionManager.prototype.wouldDeleteBlock = function() {
129129
/**
130130
* Return whether the block would be connected if dropped immediately, based on
131131
* information from the most recent move event.
132-
* @return {boolean} true if the block would be connected if dropped
132+
* @return {boolean} True if the block would be connected if dropped
133133
* immediately.
134134
* @package
135135
*/
@@ -220,7 +220,7 @@ Blockly.DraggedConnectionManager.prototype.addHighlighting_ = function() {
220220
/**
221221
* Populate the list of available connections on this block stack. This should
222222
* only be called once, at the beginning of a drag.
223-
* @return {!Array.<!Blockly.RenderedConnection>} a list of available
223+
* @return {!Array.<!Blockly.RenderedConnection>} A list of available
224224
* connections.
225225
* @private
226226
*/

core/dropdowndiv.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ Blockly.DropDownDiv.show = function(owner, primaryX, primaryY, secondaryX, secon
297297

298298
/**
299299
* Get sizing info about the bounding element.
300-
* @return {!Object} an object containing size information about the bounding
300+
* @return {!Object} An object containing size information about the bounding
301301
* element (bounding box and width/height).
302302
* @private
303303
*/
@@ -322,7 +322,7 @@ Blockly.DropDownDiv.getBoundsInfo_ = function() {
322322
* @param {number} primaryY Desired origin point y, in absolute px
323323
* @param {number} secondaryX Secondary/alternative origin point x, in absolute px
324324
* @param {number} secondaryY Secondary/alternative origin point y, in absolute px
325-
* @returns {Object} Various final metrics, including rendered positions for drop-down and arrow.
325+
* @return {Object} Various final metrics, including rendered positions for drop-down and arrow.
326326
*/
327327
Blockly.DropDownDiv.getPositionMetrics = function(primaryX, primaryY, secondaryX, secondaryY) {
328328
var boundsInfo = Blockly.DropDownDiv.getBoundsInfo_();

core/extensions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ Blockly.Extensions.checkDropdownOptionsInTable_ = function(block, dropdownName,
398398
* @param {string} msgTemplate The template form to of the message text, with
399399
* %1 placeholder.
400400
* @param {string} fieldName The field with the replacement text.
401-
* @returns {Function} The extension function.
401+
* @return {Function} The extension function.
402402
*/
403403
Blockly.Extensions.buildTooltipWithFieldText = function(msgTemplate,
404404
fieldName) {

core/field.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Blockly.Field.register = function(type, fieldClass) {
8383
* Blockly.Field.register.
8484
* @param {!Object} options A JSON object with a type and options specific
8585
* to the field type.
86-
* @returns {?Blockly.Field} The new field instance or null if a field wasn't
86+
* @return {?Blockly.Field} The new field instance or null if a field wasn't
8787
* found with the given type name
8888
* @package
8989
*/
@@ -264,7 +264,7 @@ Blockly.Field.prototype.updateEditable = function() {
264264
* editable (e.g. text labels). Those fields are not serialized to XML. Other
265265
* fields may be editable, and therefore serialized, but may exist on
266266
* non-editable blocks.
267-
* @return {boolean} whether this field is editable and on an editable block
267+
* @return {boolean} Whether this field is editable and on an editable block
268268
*/
269269
Blockly.Field.prototype.isCurrentlyEditable = function() {
270270
return this.EDITABLE && !!this.sourceBlock_ && this.sourceBlock_.isEditable();

core/field_angle.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ goog.inherits(Blockly.FieldAngle, Blockly.FieldTextInput);
5858
/**
5959
* Construct a FieldAngle from a JSON arg object.
6060
* @param {!Object} options A JSON object with options (angle).
61-
* @returns {!Blockly.FieldAngle} The new field instance.
61+
* @return {!Blockly.FieldAngle} The new field instance.
6262
* @package
6363
* @nocollapse
6464
*/

core/field_checkbox.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ goog.inherits(Blockly.FieldCheckbox, Blockly.Field);
5050
/**
5151
* Construct a FieldCheckbox from a JSON arg object.
5252
* @param {!Object} options A JSON object with options (checked).
53-
* @returns {!Blockly.FieldCheckbox} The new field instance.
53+
* @return {!Blockly.FieldCheckbox} The new field instance.
5454
* @package
5555
* @nocollapse
5656
*/

core/field_colour.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ goog.inherits(Blockly.FieldColour, Blockly.Field);
5353
/**
5454
* Construct a FieldColour from a JSON arg object.
5555
* @param {!Object} options A JSON object with options (colour).
56-
* @returns {!Blockly.FieldColour} The new field instance.
56+
* @return {!Blockly.FieldColour} The new field instance.
5757
* @package
5858
* @nocollapse
5959
*/

core/field_date.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ goog.inherits(Blockly.FieldDate, Blockly.Field);
6161
/**
6262
* Construct a FieldDate from a JSON arg object.
6363
* @param {!Object} options A JSON object with options (date).
64-
* @returns {!Blockly.FieldDate} The new field instance.
64+
* @return {!Blockly.FieldDate} The new field instance.
6565
* @package
6666
* @nocollapse
6767
*/

core/field_dropdown.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ goog.inherits(Blockly.FieldDropdown, Blockly.Field);
6868
/**
6969
* Construct a FieldDropdown from a JSON arg object.
7070
* @param {!Object} options A JSON object with options (options).
71-
* @returns {!Blockly.FieldDropdown} The new field instance.
71+
* @return {!Blockly.FieldDropdown} The new field instance.
7272
* @package
7373
* @nocollapse
7474
*/
@@ -249,7 +249,7 @@ Blockly.FieldDropdown.prototype.createWidget_ = function(menu) {
249249
* the size of the checkmark that is displayed next to the currently selected
250250
* item. This means that the item text will be positioned directly under the
251251
* field text, rather than offset slightly.
252-
* @returns {!Object} The bounding rectangle of the anchor, in window
252+
* @return {!Object} The bounding rectangle of the anchor, in window
253253
* coordinates.
254254
* @private
255255
*/

core/field_image.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ goog.inherits(Blockly.FieldImage, Blockly.Field);
6969
* dereferencing any string table references.
7070
* @param {!Object} options A JSON object with options (src, width, height,
7171
* alt, and flipRtl).
72-
* @returns {!Blockly.FieldImage} The new field instance.
72+
* @return {!Blockly.FieldImage} The new field instance.
7373
* @package
7474
* @nocollapse
7575
*/

core/field_label.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ goog.inherits(Blockly.FieldLabel, Blockly.Field);
5252
* Construct a FieldLabel from a JSON arg object,
5353
* dereferencing any string table references.
5454
* @param {!Object} options A JSON object with options (text, and class).
55-
* @returns {!Blockly.FieldLabel} The new field instance.
55+
* @return {!Blockly.FieldLabel} The new field instance.
5656
* @package
5757
* @nocollapse
5858
*/

core/field_number.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ goog.inherits(Blockly.FieldNumber, Blockly.FieldTextInput);
5656
* Construct a FieldNumber from a JSON arg object.
5757
* @param {!Object} options A JSON object with options (value, min, max, and
5858
* precision).
59-
* @returns {!Blockly.FieldNumber} The new field instance.
59+
* @return {!Blockly.FieldNumber} The new field instance.
6060
* @package
6161
* @nocollapse
6262
*/

core/field_textinput.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ goog.inherits(Blockly.FieldTextInput, Blockly.Field);
5656
* dereferencing any string table references.
5757
* @param {!Object} options A JSON object with options (text, class, and
5858
* spellcheck).
59-
* @returns {!Blockly.FieldTextInput} The new field instance.
59+
* @return {!Blockly.FieldTextInput} The new field instance.
6060
* @package
6161
* @nocollapse
6262
*/

core/field_variable.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ goog.inherits(Blockly.FieldVariable, Blockly.FieldDropdown);
6767
* dereferencing any string table references.
6868
* @param {!Object} options A JSON object with options (variable,
6969
* variableTypes, and defaultType).
70-
* @returns {!Blockly.FieldVariable} The new field instance.
70+
* @return {!Blockly.FieldVariable} The new field instance.
7171
* @package
7272
* @nocollapse
7373
*/
@@ -160,7 +160,7 @@ Blockly.FieldVariable.prototype.getText = function() {
160160
* Get the variable model for the selected variable.
161161
* Not guaranteed to be in the variable map on the workspace (e.g. if accessed
162162
* after the variable has been deleted).
163-
* @return {?Blockly.VariableModel} the selected variable, or null if none was
163+
* @return {?Blockly.VariableModel} The selected variable, or null if none was
164164
* selected.
165165
* @package
166166
*/

core/flyout_horizontal.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ Blockly.HorizontalFlyout.prototype.layout_ = function(contents, gaps) {
317317
* determine if a new block should be created or if the flyout should scroll.
318318
* @param {!goog.math.Coordinate} currentDragDeltaXY How far the pointer has
319319
* moved from the position at mouse down, in pixel units.
320-
* @return {boolean} true if the drag is toward the workspace.
320+
* @return {boolean} True if the drag is toward the workspace.
321321
* @package
322322
*/
323323
Blockly.HorizontalFlyout.prototype.isDragTowardWorkspace = function(

core/flyout_vertical.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ Blockly.VerticalFlyout.prototype.layout_ = function(contents, gaps) {
294294
* determine if a new block should be created or if the flyout should scroll.
295295
* @param {!goog.math.Coordinate} currentDragDeltaXY How far the pointer has
296296
* moved from the position at mouse down, in pixel units.
297-
* @return {boolean} true if the drag is toward the workspace.
297+
* @return {boolean} True if the drag is toward the workspace.
298298
* @package
299299
*/
300300
Blockly.VerticalFlyout.prototype.isDragTowardWorkspace = function(

core/gesture.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ Blockly.Gesture.prototype.updateIsDraggingFromFlyout_ = function() {
354354
* drag radius is exceeded. It should be called no more than once per gesture.
355355
* If a bubble should be dragged this function creates the necessary
356356
* BubbleDragger and starts the drag.
357-
* @return {boolean} true if a bubble is being dragged.
357+
* @return {boolean} True if a bubble is being dragged.
358358
* @private
359359
*/
360360
Blockly.Gesture.prototype.updateIsDraggingBubble_ = function() {
@@ -373,7 +373,7 @@ Blockly.Gesture.prototype.updateIsDraggingBubble_ = function() {
373373
* drag radius is exceeded. It should be called no more than once per gesture.
374374
* If a block should be dragged, either from the flyout or in the workspace,
375375
* this function creates the necessary BlockDragger and starts the drag.
376-
* @return {boolean} true if a block is being dragged.
376+
* @return {boolean} True if a block is being dragged.
377377
* @private
378378
*/
379379
Blockly.Gesture.prototype.updateIsDraggingBlock_ = function() {
@@ -869,7 +869,7 @@ Blockly.Gesture.prototype.setStartFlyout_ = function(flyout) {
869869
/**
870870
* Whether this gesture is a click on a bubble. This should only be called when
871871
* ending a gesture (mouse up, touch end).
872-
* @return {boolean} whether this gesture was a click on a bubble.
872+
* @return {boolean} Whether this gesture was a click on a bubble.
873873
* @private
874874
*/
875875
Blockly.Gesture.prototype.isBubbleClick_ = function() {
@@ -881,7 +881,7 @@ Blockly.Gesture.prototype.isBubbleClick_ = function() {
881881
/**
882882
* Whether this gesture is a click on a block. This should only be called when
883883
* ending a gesture (mouse up, touch end).
884-
* @return {boolean} whether this gesture was a click on a block.
884+
* @return {boolean} Whether this gesture was a click on a block.
885885
* @private
886886
*/
887887
Blockly.Gesture.prototype.isBlockClick_ = function() {
@@ -894,7 +894,7 @@ Blockly.Gesture.prototype.isBlockClick_ = function() {
894894
/**
895895
* Whether this gesture is a click on a field. This should only be called when
896896
* ending a gesture (mouse up, touch end).
897-
* @return {boolean} whether this gesture was a click on a field.
897+
* @return {boolean} Whether this gesture was a click on a field.
898898
* @private
899899
*/
900900
Blockly.Gesture.prototype.isFieldClick_ = function() {
@@ -907,7 +907,7 @@ Blockly.Gesture.prototype.isFieldClick_ = function() {
907907
/**
908908
* Whether this gesture is a click on a workspace. This should only be called
909909
* when ending a gesture (mouse up, touch end).
910-
* @return {boolean} whether this gesture was a click on a workspace.
910+
* @return {boolean} Whether this gesture was a click on a workspace.
911911
* @private
912912
*/
913913
Blockly.Gesture.prototype.isWorkspaceClick_ = function() {
@@ -922,7 +922,7 @@ Blockly.Gesture.prototype.isWorkspaceClick_ = function() {
922922
* Whether this gesture is a drag of either a workspace or block.
923923
* This function is called externally to block actions that cannot be taken
924924
* mid-drag (e.g. using the keyboard to delete the selected blocks).
925-
* @return {boolean} true if this gesture is a drag of a workspace or block.
925+
* @return {boolean} True if this gesture is a drag of a workspace or block.
926926
* @package
927927
*/
928928
Blockly.Gesture.prototype.isDragging = function() {
@@ -934,7 +934,7 @@ Blockly.Gesture.prototype.isDragging = function() {
934934
* Whether this gesture has already been started. In theory every mouse down
935935
* has a corresponding mouse up, but in reality it is possible to lose a
936936
* mouse up, leaving an in-process gesture hanging.
937-
* @return {boolean} whether this gesture was a click on a workspace.
937+
* @return {boolean} Whether this gesture was a click on a workspace.
938938
* @package
939939
*/
940940
Blockly.Gesture.prototype.hasStarted = function() {

0 commit comments

Comments
 (0)