Closed brunofunnie closed 7 months ago
thank you very much for the report, we will look into it.
We are still in the process of providing proper typings for melonJS, please do share if you find any other issues. In the mean time, you can use @ts-ignore
to remove the warning/error report in VSC.
I have a fix for this, just need the suitable replacement name for Body
class. Atm I'm using BodyObject
for it. the Method will still be using body
Do I need to commit the updated Doc as well?
For now I'm working around this with:
import { Body } from "melonjs";
const body = this.body as unknown as Body;
// use `body` wherever needed
Would be great to get a real fix for it!
me too It has been bothering me, but I really don't know how to fix it properly (I mean without renaming the object!)
This one should be fixed now, I just simply "tricked" it by importing Body within the Renderable class (together with referencing the Body class, so that the bundler doesnt complain).
I found out another issue is that rollup does not always respect the right module order in the bundle if I add import/reference for Application. Another issue, but at least the Body one should be resolved now.
I will leave this one open until the next 17.1 version is released and the fix confirmed to work.
17.1.0 released, if you guys could confirm it's now correct from your side as well, thanks !
closing this one, working on my side.
I notice that when using the Typescript boilerplate and when setting a new Body it refers to the DOM instead of MelonJS.
The code:
On VSCODE shows:
Typescript reference of Body:
Using a just cloned Typescript Boilerplate and following the https://codemonkey.club/getting-started-with-melonjs/