Skip to content

Commit c5119ec

Browse files
Allow unit struct to be flattened as empty object
1 parent e9789fa commit c5119ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

macros/src/types/unit.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pub(crate) fn empty_object(attr: &StructAttr, ts_name: Expr) -> DerivedTS {
1313
DerivedTS {
1414
crate_rename: crate_rename.clone(),
1515
inline: quote!("Record<symbol, never>".to_owned()),
16-
inline_flattened: None,
16+
inline_flattened: Some(quote!("{ }".to_owned())),
1717
docs: attr.docs.clone(),
1818
dependencies: Dependencies::new(crate_rename),
1919
export: attr.export,

0 commit comments

Comments
 (0)