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
I found this issue but not sure if it explains my case. What I tried are change the type to Option<HashMap<String, Value>> and pub metadata: Option<Value>, to no succeed. They were generated as metadata?: Value; which is unkown type.
and in your typescript, add the following (in a global types file)
typeSomeAlias=any
That way you don't have to use Value in your HashMap on the Rust side.
You can also use a custom type when #73 is merged in, but (personally) I'd opt for the alias here so future refactors maintain integrity without having to manually update the #[tsync(ts_type='...') string in the attribute.
Activity
[-]HasMap value as any type[/-][+]`HashMap` value as any type[/+][-]`HashMap` value as any type[/-][+]`HashMap` value as `any` type[/+]AnthonyMichaelTDM commentedon Oct 30, 2025
this might be possible if/when #34 is implemented, but until then would defining
Valueas an alias toanyin your typescript do the trick?Wulf commentedon Dec 23, 2025
My suggestion is to introduce a Rust alias for this
and in your typescript, add the following (in a global types file)
That way you don't have to use
Valuein your HashMap on the Rust side.You can also use a custom type when #73 is merged in, but (personally) I'd opt for the alias here so future refactors maintain integrity without having to manually update the
#[tsync(ts_type='...')string in the attribute.