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
Copy file name to clipboardExpand all lines: README.md
+2-4Lines changed: 2 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,7 +61,7 @@ pub struct Group {
61
61
}
62
62
```
63
63
64
-
You can use `rename_all` and `rename` for field naming policies. All code generated by `derive(TS)` is under `#[cfg(any(test, feature="gents"))]`, so it has zero impact on your release binary.
64
+
You can use `rename_all` and `rename` for field naming policies.
65
65
66
66
### 3. Generate TypeScript Files
67
67
@@ -89,7 +89,7 @@ fn gents() {
89
89
90
90
### 5. Cross-Crate Usage
91
91
92
-
If your `TS` derives are spread across multiple crates, define a feature called `gents` in each crate and use `#[cfg(feature = "gents")]` to control code generation.
92
+
If your `TS` derives are spread across multiple crates, define a feature called `gents` in each crate and use `#[cfg(feature = "gents")]` to control code generation.
93
93
See [LogiSheets example](https://github.com/proclml/LogiSheets/blob/master/crates/buildtools/src/generate.rs) for advanced multi-crate setup.
94
94
95
95
### 6. Integration with Frontend
@@ -105,8 +105,6 @@ See [LogiSheets example](https://github.com/proclml/LogiSheets/blob/master/crate
105
105
When you add a type to `FileGroup`, all of its dependencies (other structs/enums it uses) are automatically included.
106
106
-**Customizing output:**
107
107
You can control file names, field naming, and more via attributes.
108
-
-**No runtime overhead:**
109
-
All code generated by `gents` is behind `#[cfg(test)]` or `#[cfg(feature = "gents")]` and will not affect your release binary.
110
108
-**Use in CI:**
111
109
You can run the generation test in your CI pipeline to ensure TypeScript types are always up to date.
0 commit comments