TilemapFilterCallback return value type fix

This commit is contained in:
Pavle Goloskokovic 2023-01-17 15:19:36 +01:00
parent 27a6c60392
commit 815e1460d6

View file

@ -20,13 +20,15 @@ var TilemapLayer = require('./TilemapLayer');
var Tileset = require('./Tileset'); var Tileset = require('./Tileset');
/** /**
* A predicate, to test each element of the array.
*
* @callback TilemapFilterCallback * @callback TilemapFilterCallback
* *
* @param {Phaser.GameObjects.GameObject} value - An object found in the filtered area. * @param {Phaser.GameObjects.GameObject} value - An object found in the filtered area.
* @param {number} index - The index of the object within the array. * @param {number} index - The index of the object within the array.
* @param {Phaser.GameObjects.GameObject[]} array - An array of all the objects found. * @param {Phaser.GameObjects.GameObject[]} array - An array of all the objects found.
* *
* @return {Phaser.GameObjects.GameObject} The object. * @return {boolean} A value that coerces to `true` to keep the element, or to `false` otherwise.
*/ */
/** /**
@ -925,7 +927,7 @@ var Tilemap = new Class({
/** /**
* For each object in the given object layer, run the given filter callback function. Any * For each object in the given object layer, run the given filter callback function. Any
* objects that pass the filter test (i.e. where the callback returns true) will returned as a * objects that pass the filter test (i.e. where the callback returns true) will be returned in a
* new array. Similar to Array.prototype.Filter in vanilla JS. * new array. Similar to Array.prototype.Filter in vanilla JS.
* *
* @method Phaser.Tilemaps.Tilemap#filterObjects * @method Phaser.Tilemaps.Tilemap#filterObjects