dimforge / rapier.js

Official JavaScript bindings for the Rapier physics engine.
https://rapier.rs
Apache License 2.0
412 stars 57 forks source link

rapier3d-compat package has incorrect raw.d.ts output #41

Closed robertlong closed 2 years ago

robertlong commented 3 years ago

In the rapier3d-compat build the raw.d.ts file contains export * from "../pkg3d/rapier_wasm3d"; which does not exist in the distributed package. In the rapier3d build, this file is export * from "./rapier_wasm3d"; which would work just fine in the compat build.

This line is added for the rapier3d build here but I don't see a corresponding line for the compat build.

This results in typescript errors when building projects against the compat build such as:

node_modules/@dimforge/rapier3d-compat/dynamics/ccd_solver.d.ts:1:10 - error TS2305: Module '"../raw"' has no exported member 'RawCCDSolver'.

1 import { RawCCDSolver } from "../raw";
sebcrozet commented 3 years ago

Hi! Thank you for pointing this out. I made a release 0.7.3 of rapier-compat with a manual fix. Could you please try it? I haven’t pushed the fix here on github yet because I need to figure out #43 first.

sebcrozet commented 2 years ago

The fix has been automated in the version 0.7.6. Please reopen if the problem persists.