madonoharu / tsify

A library for generating TypeScript definitions from rust code.
Apache License 2.0
300 stars 41 forks source link

Doesn't work for return types if the function is async? #11

Closed ivnsch closed 1 year ago

ivnsch commented 1 year ago

Hi! thanks for creating this library. As the title says, it seems not to work for return types if the exported bindgen function is async. This error shows:

the trait bound `wasm_bindgen::JsValue: From<MyStruct>` is not satisfied

If I make the function non async, it works. For parameters it always works.

ivnsch commented 1 year ago

I tried this out today again and it's working. Closing for now.

For completeness, adding that last time From<MyStruct> should have been implemented. It worked when the function was non-async.