/**
 * Fit text font size into the target area.
 *
 * @param textObject - Target text game object.
 * @param width - Target width.
 * @param height - Target height.
 * @returns The updated text game object.
 */
export default function (
    textObject: Phaser.GameObjects.GameObject,
    width: number,
    height?: number
): Phaser.GameObjects.GameObject;
