The struct has rename_all(deserialize = "...") or rename_all(serialize = "...")
The tsify macro only generates either into_wasm_abi or from_wasm_abi
With the two, if the rename_all aligns with the single generated variant, one would expect the generated TS code to follow the (e.g.) + into_wasm_abi with the rename_all(serialize = "...") outputs. Based on this, hoping to submit this as a FR to add functionality to enable intrinsic renaming behaviour.
Reproducible Issue
use tsify::Tsify;
use serde::Deserialize;
#[derive(Deserialize, Tsify)]
#[tsify(into_wasm_abi)]
#[serde(rename_all(serialize = "camelCase"))
struct MyStruct {
should_be_camel_in_ts: i32
}
Ts Outputs
interface MyStruct {
should_be_camel_in_ts: number
}
Noting behaviour where:
rename_all(deserialize = "...")
orrename_all(serialize = "...")
into_wasm_abi
orfrom_wasm_abi
With the two, if the
rename_all
aligns with the single generated variant, one would expect the generated TS code to follow the (e.g.) +into_wasm_abi
with therename_all(serialize = "...")
outputs. Based on this, hoping to submit this as a FR to add functionality to enable intrinsic renaming behaviour.Reproducible Issue
Ts Outputs
Expected