Open siefkenj opened 9 months ago
When serde(rename = ...) is used the exported type is named to the rename value, but if this type is referenced elsewhere, the original name is used.
serde(rename = ...)
rename
e.g.
#[derive(Debug, Clone, Serialize, Deserialize, Tsify)] #[serde(rename = "foo")] pub struct Foo { x: i32, } #[derive(Debug, Clone, Serialize, Deserialize, Tsify)] pub struct Bar { foo: Foo, }
produces
export interface foo { x: number; } export interface Bar { foo: Foo; }
which refers to a non-existent Foo type.
Foo
When
serde(rename = ...)
is used the exported type is named to therename
value, but if this type is referenced elsewhere, the original name is used.e.g.
produces
which refers to a non-existent
Foo
type.