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
Hi! I want to use tsify to generate types (duh :D) for a public API, and I would like my rustdoc comments on my structs and fields to transport over to the TS definitions.
E.g. I have
/// JSON-compatible and human readable format of transactions. E.g. addresses are presented in their human-readable/// format and address types and the network are represented as strings. Data and proof are serialized as an object/// describing their contents.#[derive(serde::Serialize, serde::Deserialize,Tsify)]#[serde(rename_all = "camelCase")]pubstructPlainTransaction{/// The transaction's unique hash, used as its identifier. Sometimes also called `txId`.pubtransaction_hash:String,// [...]}
but unfortunately the generated TS types don't include those doc comments:
/** * JSON-compatible and human readable format of transactions. E.g. addresses are presented in their human-readable * format and address types and the network are represented as strings. Data and proof are serialized as an object * describing their contents. */exportinterfacePlainTransaction{/** * The transaction's unique hash, used as its identifier. Sometimes also called `txId`. */transactionHash: string;}
wasm-bindgen does this, it converts the rustdoc into JSDoc annotations.
Is this complicated?
The text was updated successfully, but these errors were encountered:
Hi! I want to use tsify to generate types (duh :D) for a public API, and I would like my rustdoc comments on my structs and fields to transport over to the TS definitions.
E.g. I have
but unfortunately the generated TS types don't include those doc comments:
I would like the output to be this instead:
wasm-bindgen does this, it converts the rustdoc into JSDoc annotations.
Is this complicated?
The text was updated successfully, but these errors were encountered: