Skip to content

Commit

Permalink
make Option values optional
Browse files Browse the repository at this point in the history
  • Loading branch information
MrFoxPro committed Sep 13, 2024
1 parent baf136a commit 4c9f0c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion serde-generate/src/typescript.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ impl<'a, T: Write> TypeScriptEmitter<'a, T> {
self.out.indent();
for field in fields {
match field.value {
Format::Unit => {
Format::Unit | Format::Option {..} => {
writeln!(self.out, "{}?: {},", field.name, self.quote_type(&field.value))?;
}
_ => { writeln!(self.out, "{}: {},", field.name, self.quote_type(&field.value))?; }
Expand Down

0 comments on commit 4c9f0c3

Please sign in to comment.