phaserjs / phaser

Phaser is a fun, free and fast 2D game framework for making HTML5 games for desktop and mobile web browsers, supporting Canvas and WebGL rendering.
https://phaser.io
MIT License
37.16k stars 7.1k forks source link

Typescript bug: GameConfig white, missing and default images type error #6904

Closed AlvaroNeuronup closed 2 months ago

AlvaroNeuronup commented 2 months ago

There is a type error with the missing, white and default images. Type is string | undefined it should be string | undefined | null

Version

3.85.1 using typescript npm package

Description

According to 3.85 version, you can set images to null:

Example Test Code

image

photonstorm commented 2 months ago

Thank you for submitting this issue. We have fixed this and the fix has been pushed to the master branch. It will be part of the next release. If you get time to build and test it for yourself we would appreciate that.