diff --git a/macros/src/types/unit.rs b/macros/src/types/unit.rs index 4b4f88de..00268844 100644 --- a/macros/src/types/unit.rs +++ b/macros/src/types/unit.rs @@ -12,7 +12,7 @@ pub(crate) fn empty_object(attr: &StructAttr, ts_name: Expr) -> DerivedTS { DerivedTS { crate_rename: crate_rename.clone(), - inline: quote!("Record".to_owned()), + inline: quote!("Record".to_owned()), inline_flattened: None, docs: attr.docs.clone(), dependencies: Dependencies::new(crate_rename), diff --git a/ts-rs/tests/integration/docs.rs b/ts-rs/tests/integration/docs.rs index f4627e4c..32afc819 100644 --- a/ts-rs/tests/integration/docs.rs +++ b/ts-rs/tests/integration/docs.rs @@ -212,15 +212,15 @@ fn export_c() { C::export().unwrap(); let expected_content = concat!( - "// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.\n\n", - "/**\n", - " * Doc comment.\n", - " * Supports new lines.\n", - " *\n", - " * Testing\n", - " */\n", - "export type C = Record;\n", - ); + "// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.\n\n", + "/**\n", + " * Doc comment.\n", + " * Supports new lines.\n", + " *\n", + " * Testing\n", + " */\n", + "export type C = Record;\n", + ); let actual_content = fs::read_to_string(C::default_output_path().unwrap()).unwrap(); diff --git a/ts-rs/tests/integration/unit.rs b/ts-rs/tests/integration/unit.rs index 999d4c3c..55f3707f 100644 --- a/ts-rs/tests/integration/unit.rs +++ b/ts-rs/tests/integration/unit.rs @@ -6,7 +6,7 @@ use ts_rs::TS; struct Unit; // serde_json serializes this to `{}`. -// The TS type best describing an empty object is `Record`. +// The TS type best describing an empty object is `Record`. #[derive(TS)] #[ts(export, export_to = "unit/")] struct Unit2 {} @@ -25,7 +25,7 @@ struct Unit4(()); #[test] fn test() { assert_eq!("type Unit = null;", Unit::decl()); - assert_eq!("type Unit2 = Record;", Unit2::decl()); + assert_eq!("type Unit2 = Record;", Unit2::decl()); assert_eq!("type Unit3 = never[];", Unit3::decl()); assert_eq!("type Unit4 = null;", Unit4::decl()); }