phaser icon indicating copy to clipboard operation
phaser copied to clipboard

Inaccurate typedef for TextStyle.fontSize

Open orjandh opened this issue 3 years ago • 0 comments

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?

orjandh avatar Aug 23 '22 10:08 orjandh