phaser
phaser copied to clipboard
Inaccurate typedef for TextStyle.fontSize
Version
- Phaser Version: 3.55.2
Description
The typdef for TextStyle.fontSize is string (https://github.com/photonstorm/phaser/blob/v3.51.0/src/gameobjects/text/typedefs/TextStyle.js#L8). This is fine, but it also supports to be a number, as seen here (https://github.com/photonstorm/phaser/blob/v3.51.0/src/gameobjects/text/TextStyle.js#L408). Maybe the typedef should be changed to be the union of string and number so that the number argument can be used with typescript?