将Phaser更新为3.17之后
npm install phaser@3.17.0
我现在收到以下Typescript错误:
const config: GameConfig = {
scene: [BootScene, StartScene, GameScene, GameOver],
input: {
keyboard: true
}
}
找不到名称'GameConfig'
在查看.d.ts
文件时,我想我现在必须使用:
const config: Phaser.Types.Core.GameConfig = {
scene: [BootScene, StartScene, GameScene, GameOver],
input: {
keyboard: true
}
}
但是现在scene
不再被视为GameConfig的一部分!
期望的类型来自属性'scene',该属性在此处声明为'GameConfig'
我不知道这意味着什么……这是.d.ts
文件中的错误吗?