Skip to content

Commit 4c9f0c3

Browse files
committed
make Option values optional
1 parent baf136a commit 4c9f0c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

serde-generate/src/typescript.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ impl<'a, T: Write> TypeScriptEmitter<'a, T> {
272272
self.out.indent();
273273
for field in fields {
274274
match field.value {
275-
Format::Unit => {
275+
Format::Unit | Format::Option {..} => {
276276
writeln!(self.out, "{}?: {},", field.name, self.quote_type(&field.value))?;
277277
}
278278
_ => { writeln!(self.out, "{}: {},", field.name, self.quote_type(&field.value))?; }

0 commit comments

Comments
 (0)