Skip to content

Commit

Permalink
Add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavo-shigueo committed Dec 1, 2024
1 parent 21d03f5 commit faa431f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ts-rs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,12 @@ mod tokio;
/// Include the structs name (or value of `#[ts(rename = "..")]`) as a field with the given key.
/// <br/><br/>
///
/// - **`#[ts(optional_fields)]`**
/// Makes all `Option<T>` fields in a struct optional.
/// If `#[ts(optional_fields)]` is present, `t?: T` is generated for every `Option<T>` field of the struct.
/// If `#[ts(optional_fields = nullable)]` is present, `t?: T | null` is generated for every `Option<T>` field of the struct.
/// <br/><br/>
///
/// ### struct field attributes
///
/// - **`#[ts(type = "..")]`**
Expand Down

0 comments on commit faa431f

Please sign in to comment.