Previously #[serde(rename = "...")] can be used to rename types, but it had a problem when the type is referenced in other types madonoharu#43
However, without renaming, there could be name collisions
use serde::{Deserialize, Serialize};
use tsify::Tsify;
use wasm_bindgen::prelude::*;
mod foo {
#[derive(Tsify, Serialize, Deserialize)]
#[tsify(into_wasm_abi, from_wasm_abi)]
pub struct Bar {
...
}
}
mod biz {
#[derive(Tsify, Serialize, Deserialize)]
#[tsify(into_wasm_abi, from_wasm_abi)]
pub struct Bar {
...
}
}
becomes
export interface Bar {
...
}
export interface Bar {
...
}
To fix this, 3e81856 could be reverted to enable rename again, and madonoharu#43 can be addressed with #[tsify(type = "RenamedType")]
Previously
#[serde(rename = "...")]can be used to rename types, but it had a problem when the type is referenced in other types madonoharu#43However, without renaming, there could be name collisions
becomes
To fix this, 3e81856 could be reverted to enable rename again, and madonoharu#43 can be addressed with
#[tsify(type = "RenamedType")]