Skip to content

Factory.staticBody wrong return type description (body instead of staticbody) #6693

@ddhaiby

Description

@ddhaiby

Version

  • Phaser Version: 3.70

Description

There seems to be an issue with the return type for Factory.staticBody function the phaser.d.ts.
The return type is body but it should be staticbody. The right type is returned but the indication is wrong so my project will complainas I use typescript.

Example Test Code

const myStaticBody = this.physics.addbody(0,0); // Will say that it returns a body (okay!) const myStaticBody = this.physics.add.staticBody(0,0); // Will also that it returns a body (not okay!!)

Additional Information

image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions