From 4c93ebe0f4e91c0695d012467d8ad0f5e910065a Mon Sep 17 00:00:00 2001 From: Gustavo Date: Fri, 8 Mar 2024 15:55:46 -0300 Subject: [PATCH] Ensure ts-rs doctests compile --- ts-rs/src/lib.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/ts-rs/src/lib.rs b/ts-rs/src/lib.rs index 40a0990..2952875 100644 --- a/ts-rs/src/lib.rs +++ b/ts-rs/src/lib.rs @@ -287,12 +287,19 @@ pub trait TS { /// If the type does have generic parameters, then all generic parameters must be replaced with /// a dummy type, e.g `ts_rs::Dummy` or `()`. /// The only requirement for these dummy types is that `EXPORT_TO` must be `None`. - /// Example: - /// ```ignore + /// + /// # Example: + /// ``` + /// use ts_rs::TS; /// struct GenericType(A, B); /// impl TS for GenericType { /// type WithoutGenerics = GenericType; /// // ... + /// # fn decl() -> String { todo!() } + /// # fn decl_concrete() -> String { todo!() } + /// # fn name() -> String { todo!() } + /// # fn inline() -> String { todo!() } + /// # fn inline_flattened() -> String { todo!() } /// } /// ``` type WithoutGenerics: TS + ?Sized;