Version
- Phaser Version: 4.2.1
- Operating system: N/A
- Browser:N/A
Description
Phaser.Animations.AnimationManager#get currently does not include undefined in its return type.
This is unsafe and potentially game-crashing - querying a nonexistent animation will return undefined from the underlying map and possibly crash the game if accessed.
Example Test Code
// silently crashes if key is missing
globalScene.anims.get(key).frameRate = frameRate;
Additional Information
If needed, we could make the updated typing opt-in via declaration merging if or when an alternate type declaration library is found (one which supports conditional types).
Version
Description
Phaser.Animations.AnimationManager#getcurrently does not includeundefinedin its return type.This is unsafe and potentially game-crashing - querying a nonexistent animation will return
undefinedfrom the underlying map and possibly crash the game if accessed.Example Test Code
Additional Information
If needed, we could make the updated typing opt-in via declaration merging if or when an alternate type declaration library is found (one which supports conditional types).