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
#[tsync]#[derive(SomeDieselStuff,Serialize)]pubstructFoo{pubfield1:Type1,pubfield2:Type2,#[serde(rename = "type")]pubtype_:FooType,// called type_ to avoid diesel errors caused by using r#type// although as it turns out r#type is also not handled by tsync}
In the generated output, I get an interface containing type_ and not containing type, where I would expect the interface to contain type instead of type_.
This should probably have its own issue, but using r#type causes the same issue - the generated typescript output would then contain a member called r#type (which is a syntax error in TypeScript, aside from simply being wrong - serde serialises this without the r# as would be expected by the identifier parsing rules)
The text was updated successfully, but these errors were encountered:
hey @Starwort, thanks for reporting this. I currently don’t have time to implement this but I’d welcome any PR. Let me know if I can explain any parts of the code.
I have a type which looks like the following:
In the generated output, I get an interface containing
type_
and not containingtype
, where I would expect the interface to containtype
instead oftype_
.This should probably have its own issue, but using
r#type
causes the same issue - the generated typescript output would then contain a member calledr#type
(which is a syntax error in TypeScript, aside from simply being wrong - serde serialises this without ther#
as would be expected by the identifier parsing rules)The text was updated successfully, but these errors were encountered: