Closed vankop closed 2 months ago
Hi @vankop, kindly provide test code examples so we can investigate further and have a better understanding of the issue you're facing. Thanks!
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.
This seems to have broken the type definition in 3.86.0:
Behaviour:
SceneManager.getScene<T extends Phaser.Scene>(key: (T|string)): Phaser.Scene | null
ScenePlugin.get<T extends Phaser.Scene>(key: (T|string)): Phaser.Scene;
Expected:
SceneManager.getScene<T extends Phaser.Scene>(key: (T|string)): T | null
ScenePlugin.get<T extends Phaser.Scene>(key: (T|string)): T | null;
Version
Description
SceneManager.getScene
has wrong return type in ts definition. seetypes/phaser.d.ts
. Should bePhaser.Scene
iftypeof key === "string"
Example Test Code
Additional Information