Closed isaac-mason closed 1 year ago
Thanks!
B.t.w. I tried to publish a new version with this change, but I see v0.0.3 still has the old enum definitions.
I ran build.sh
and then npm publish
.
Is there something else I should do?
No worries :)
You might just need to do another npm install
?
That fixes it, thanks!
Previously, the generated typescript type for an enum was a union of the member name strings. This is the desired behaviour for the webidl spec, but does not match the bindings that emscripten generates.
For example, looking at the
Layers
enum:With the following webidl:
This typescript type was generated:
There's a few issues with this with regards to emscripten-generated bindings:
Jolt.MOVING
andJolt.NON_MOVING
aren't present_emscripten_enum_Layers_MOVING
and_emscripten_enum_Layers_NON_MOVING
aren't presentWith
webidl-dts-gen
v1.1.1, the output for enums in emscripten mode is now: