Skip to content

Commit 4cff464

Browse files
committed
Fix nullable types
1 parent 1de572a commit 4cff464

10 files changed

Lines changed: 11 additions & 11 deletions

File tree

src/curves/path/Path.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ var Path = new Class({
516516
* @param {number} t - [description]
517517
* @param {Phaser.Math.Vector2} [out] - [description]
518518
*
519-
* @return {Phaser.Math.Vector2|null} [description]
519+
* @return {?Phaser.Math.Vector2} [description]
520520
*/
521521
getPoint: function (t, out)
522522
{

src/display/canvas/Smoothing.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ var Smoothing = function ()
107107
*
108108
* @param {CanvasRenderingContext2D|WebGLRenderingContext} context - [description]
109109
*
110-
* @return {boolean|null} [description]
110+
* @return {?boolean} [description]
111111
*/
112112
var isEnabled = function (context)
113113
{

src/dom/ParseXML.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*
1515
* @param {string} data - The XML source stored in a string.
1616
*
17-
* @return {DOMParser|ActiveXObject|null} The parsed XML data, or `null` if the data could not be parsed.
17+
* @return {?(DOMParser|ActiveXObject)} The parsed XML data, or `null` if the data could not be parsed.
1818
*/
1919
var ParseXML = function (data)
2020
{

src/gameobjects/group/Group.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ var Group = new Class({
562562
* @param {string|integer} [frame] - An optional frame from the Texture this Game Object is rendering with.
563563
* @param {boolean} [visible] - [description]
564564
*
565-
* @return {Phaser.GameObjects.GameObject|null} [description]
565+
* @return {?Phaser.GameObjects.GameObject} [description]
566566
*/
567567
getFirst: function (state, createIfNull, x, y, key, frame, visible)
568568
{

src/gameobjects/text/static/Text.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,7 @@ var Text = new Class({
779779
* @method Phaser.GameObjects.Text#setWordWrapWidth
780780
* @since 3.0.0
781781
*
782-
* @param {number|null} width - The maximum width of a line in pixels. Set to null to remove wrapping.
782+
* @param {?number} width - The maximum width of a line in pixels. Set to null to remove wrapping.
783783
* @param {boolean} [useAdvancedWrap=false] - Whether or not to use the advanced wrapping
784784
* algorithm. If true, spaces are collapsed and whitespace is trimmed from lines. If false,
785785
* spaces and whitespace are left as is.

src/physics/impact/Body.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ var Body = new Class({
7474
* The ImpactBody, ImpactSprite or ImpactImage object that owns this Body, if any.
7575
*
7676
* @name Phaser.Physics.Impact.Body#parent
77-
* @type {Phaser.Physics.Impact.ImpactBody|Phaser.Physics.Impact.ImpactImage|Phaser.Physics.Impact.ImpactSprite|null}
77+
* @type {?(Phaser.Physics.Impact.ImpactBody|Phaser.Physics.Impact.ImpactImage|Phaser.Physics.Impact.ImpactSprite)}
7878
* @since 3.0.0
7979
*/
8080
this.parent;

src/physics/impact/World.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ var World = new Class({
227227
* @param {integer} tileSize - The size of a tile. This is optional if loading from a Weltmeister
228228
* level in the cache.
229229
*
230-
* @return {CollisionMap|null} The newly created CollisionMap, or null if the method failed to
230+
* @return {?Phaser.Physics.Impact.CollisionMap} The newly created CollisionMap, or null if the method failed to
231231
* create the CollisionMap.
232232
*/
233233
setCollisionMap: function (key, tileSize)

src/scene/SceneManager.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ var SceneManager = new Class({
260260
* @param {Phaser.Scene|object|function} sceneConfig - [description]
261261
* @param {boolean} [autoStart=false] - If `true` the Scene will be started immediately after being added.
262262
*
263-
* @return {Phaser.Scene|null} [description]
263+
* @return {?Phaser.Scene} [description]
264264
*/
265265
add: function (key, sceneConfig, autoStart)
266266
{
@@ -747,7 +747,7 @@ var SceneManager = new Class({
747747
*
748748
* @param {string} key - [description]
749749
*
750-
* @return {Phaser.Scene|null} [description]
750+
* @return {?Phaser.Scene} [description]
751751
*/
752752
getScene: function (key)
753753
{

src/sound/BaseSound.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ var BaseSound = new Class({
312312
*
313313
* @param {string} markerName - The name of the marker to remove.
314314
*
315-
* @return {SoundMarker|null} Removed marker object or 'null' if there was no marker with provided name.
315+
* @return {?SoundMarker} Removed marker object or 'null' if there was no marker with provided name.
316316
*/
317317
removeMarker: function (markerName)
318318
{

src/textures/TextureManager.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,7 @@ var TextureManager = new Class({
679679
* @param {string} key - The unique string-based key of the Texture.
680680
* @param {string|integer} frame - The string or index of the Frame.
681681
*
682-
* @return {Phaser.Display.Color|null} A Color object populated with the color values of the requested pixel,
682+
* @return {?Phaser.Display.Color} A Color object populated with the color values of the requested pixel,
683683
* or `null` if the coordinates were out of bounds.
684684
*/
685685
getPixel: function (x, y, key, frame)

0 commit comments

Comments
 (0)