We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
type
1 parent 191298d commit 86d31f9Copy full SHA for 86d31f9
docs/src/usage/annotations.md
@@ -103,7 +103,17 @@ This would generate the following Kotlin code:
103
typealias Options = String
104
```
105
106
+This decorator can also be applied to fields. If you want a field to be serializedd
107
+as a different type in the foreign language, you can use the `(type = "...")` decorator:
108
109
+```rust
110
+#[typeshare]
111
+struct MyStruct {
112
+ #[typeshare(typescript(type = "Record<string, any>"))]
113
+ #[typeshare(python(type = "dict"))]
114
+ my_field: MyCustomType,
115
+}
116
+```
117
118
## The `#[serde]` Attribute
119
0 commit comments