melonJS icon indicating copy to clipboard operation
melonJS copied to clipboard

Type errors and missing properties

Open russellsteadman opened this issue 1 year ago • 5 comments

Describe the bug

When I type checked my files, I noticed quite a few type errors due to inconsistent typings. For example, Renderable's body references the JavaScript DOM document.body type because the type from physics/body.js is not imported.

To Reproduce (Example)

  1. Create an Entity.
  2. Add the Entity to game.world with the addChild method.
  3. Type check the file, Entity.body does not implement Renderable.body.

Expected behavior No type errors for the action.

Version:

  • melonJS Version: 14.3.0

russellsteadman avatar Dec 30 '22 15:12 russellsteadman