We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
type
1 parent 191298d commit c65b209Copy full SHA for c65b209
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 to precisely specify
107
+the serialized 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