对于该特定错误,只需将其修改为:https ://github.com/photonstorm/phaser/blob/master/build/phaser.d.ts#L2803
作为 :
class World {
constructor(game: Phaser.Game, config: Object);
applyDamping: boolean
applyGravity: boolean;
applySpringForces: boolean;
bounds: any;
collisionGroups: any[];
emitImpactEvent: boolean;
enableBodySleeping: boolean;
friction: number;
game: Phaser.Game;
gravity: Phaser.Physics.Arcade.InversePointProxy;
materials: Phaser.Physics.Arcade.Material[];
onBeginContact: Phaser.Signal;
onBodyRemoved: Phaser.Signal;
onConstraintAdded: Phaser.Signal;
onConstraintRemoved: Phaser.Signal;
onContactMaterialAdded: Phaser.Signal;
onContactMaterialRemoved: Phaser.Signal;
onEndContact: Phaser.Signal;
onImpact: Phaser.Signal;
onPostBroadphase: Phaser.Signal;
onPostStep: Phaser.Signal;
onSpringAdded: Phaser.Signal;
onSpringRemoved: Phaser.Signal;
restitution: number;
solveConstraints: boolean
startSystem: Function; // was missing
time: boolean;
world: any;
addBody(body: Phaser.Physics.Arcade.Body): boolean;
addConstraint(constraint: any)
}
请务必向他们发送拉取请求以帮助下一个人。