You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This solution is unfortunate, because I have no use for from_wasm_abi and serde::Deserialize which just add bloat.
@siefkenj I got a tip from @cwfitzgerald that you have a new fork with recent fixes, would you be open to enabling issues on your fork to get stuffed fixed there?
The text was updated successfully, but these errors were encountered:
When compiling in release mode, the bug does not appear, which made me interested to find out why. I tried compiling dev mode with codegen-units = 1 which also made the TypeScript interface show up.
Bug
Sometimes tsify won't generate a TypeScript interface.
How to reproduce
Specifically, under these circumstances:
Given a crate that has exactly one type that has a Tsify derive, and
into_wasm_abi
but NOTfrom_wasm_abi
:crates/somecrate/lib.rs
AND the type does not appear in a direct return value (but it does appear in an indirect return value)
my_wasm_lib/lib.rs
Then there will be no
interface ExampleType
in the resulting xxx.d.ts file.Mitigation
However, this can be mitigated by one or more of the following:
Let the type appear as a direct return type
This is solution is unfortunate, because I have no use for such a method.
Let the type use
from_wasm_abi
This solution is unfortunate, because I have no use for
from_wasm_abi
andserde::Deserialize
which just add bloat.@siefkenj I got a tip from @cwfitzgerald that you have a new fork with recent fixes, would you be open to enabling issues on your fork to get stuffed fixed there?
The text was updated successfully, but these errors were encountered: