Skip to content

Commit 136a835

Browse files
committed
doc improvement:
1, provide type for callback argument 2, remove comment for $type to avoid jsdoc warning: "The @type tag does not permit a description;"
1 parent f09e777 commit 136a835

3 files changed

Lines changed: 10 additions & 13 deletions

File tree

src/structs/List.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,9 @@ var NOOP = require('../utils/NOOP');
1010
var StableSort = require('../utils/array/StableSort');
1111

1212
/**
13-
* @callback EachListCallback
14-
* @generic I - [item]
13+
* @callback EachListCallback<I>
1514
*
16-
* @param {*} item - The item which is currently being processed.
15+
* @param {I} item - The item which is currently being processed.
1716
* @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.
1817
*/
1918

@@ -710,7 +709,7 @@ var List = new Class({
710709
*
711710
* @name Phaser.Structs.List#first
712711
* @genericUse {T} - [$type]
713-
* @type {*} The first item in the List or `null` for an empty List.
712+
* @type {*}
714713
* @readonly
715714
* @since 3.0.0
716715
*/
@@ -737,7 +736,7 @@ var List = new Class({
737736
*
738737
* @name Phaser.Structs.List#last
739738
* @genericUse {T} - [$type]
740-
* @type {*} The last item in the List, or `null` for an empty List.
739+
* @type {*}
741740
* @readonly
742741
* @since 3.0.0
743742
*/
@@ -766,7 +765,7 @@ var List = new Class({
766765
*
767766
* @name Phaser.Structs.List#next
768767
* @genericUse {T} - [$type]
769-
* @type {*} The next item in the List, or `null` if the entire List has been traversed.
768+
* @type {*}
770769
* @readonly
771770
* @since 3.0.0
772771
*/
@@ -795,7 +794,7 @@ var List = new Class({
795794
*
796795
* @name Phaser.Structs.List#previous
797796
* @genericUse {T} - [$type]
798-
* @type {*} The previous item in the List, or `null` if the entire List has been traversed.
797+
* @type {*}
799798
* @readonly
800799
* @since 3.0.0
801800
*/

src/structs/Map.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,10 @@
77
var Class = require('../utils/Class');
88

99
/**
10-
* @callback EachMapCallback
11-
* @generic E - [entry]
10+
* @callback EachMapCallback<E>
1211
*
1312
* @param {string} key - [description]
14-
* @param {*} entry - [description]
13+
* @param {E} entry - [description]
1514
*
1615
* @return {?boolean} [description]
1716
*/

src/structs/Set.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@
77
var Class = require('../utils/Class');
88

99
/**
10-
* @callback EachSetCallback
11-
* @generic E - [entry]
10+
* @callback EachSetCallback<E>
1211
*
13-
* @param {*} entry - [description]
12+
* @param {E} entry - [description]
1413
* @param {number} index - [description]
1514
*
1615
* @return {?boolean} [description]

0 commit comments

Comments
 (0)