-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added support for VectorIntoWasmAbi
and VectorFromWasmAbi
#41
Conversation
@siefkenj Sorry for the noise. I had an old clippy installed that did not detect the dead code. This also probably explains why the CI did not nag when this code was added first. (The dead code is unrelated to the PR.) |
Thank you for the contribution! I will review it as soon as I can :-) |
Is there a reason to put these behind a flag? Would it cause problems if Could you please add some tests to this PR? |
@@ -14,8 +12,6 @@ pub struct TsifyContainerAttrs { | |||
pub namespace: bool, | |||
/// Information about how the type should be serialized. | |||
pub ty_config: TypeGenerationConfig, | |||
/// Comments associated with the type. These will be written out to the generated Typescript. | |||
pub comments: Vec<String>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Were these comments not being used? Why was this field removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct, the static code analysis (clippy) reported that this field was never read. That was also one of the reasons the CI failed.
Thanks for your effort! |
Thank you for merging my pull request! Could you please also publish a new release that includes these changes? |
Done :-) |
Thank you so much ! This is really great stuff ! I was just missing this XD |
In this pull request (see also: this related issue), the capability to return a
Vec<SomeType>
was introduced to wasm-bindgen, whereSomeType
has the#[wasm_bindgen]
attribute.This PR further extends this capability to support returning
Vec<SomeType>
whereSomeType
derives Tsify. This is done by implementingVectorIntoWasmAbi
andVectorFromWasmAbi
introduced in the linked PR.Two new attributes were added to control whether the above traits should be implemented.Example: