Skip to content

Commit

Permalink
adjust documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
NyxCode committed Jan 29, 2024
1 parent 966ae9f commit 456ec72
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ts-rs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,10 @@ mod export;
/// Skip this field
///
/// - `#[ts(optional)]`:
/// Indicates the field may be omitted from the serialized struct
/// May be applied on a struct field of type `Option<T>`.
/// By default, such a field would turn into `t: T | null`.
/// If `#[ts(optional)]` is present, `t?: T` is generated instead.
/// If `#[ts(optional = nullable)]` is present, `t?: T | null` is generated.
///
/// - `#[ts(flatten)]`:
/// Flatten this field (only works if the field is a struct)
Expand Down

0 comments on commit 456ec72

Please sign in to comment.