After updating Phaser to 3.17 with
npm install phaser@3.17.0
I now get these Typescript errors:
const config: GameConfig = {
scene: [BootScene, StartScene, GameScene, GameOver],
input: {
keyboard: true
}
}
Cannot find name ‘GameConfig’
When looking in the .d.ts
file, I guess I now have to use:
const config: Phaser.Types.Core.GameConfig = {
scene: [BootScene, StartScene, GameScene, GameOver],
input: {
keyboard: true
}
}
But now, scene
is no longer recognised as part of GameConfig!
The expected type comes from property ‘scene’ which is declared here on type ‘GameConfig’
I have no idea what this means… is this a bug in the .d.ts
file?
The .d.ts
file also seems to have trouble with Phaser.DOM.FIT
and Phaser.DOM.CENTER_BOTH