diff --git a/tsify-next-macros/src/typescript/ts_type_from_name.rs b/tsify-next-macros/src/typescript/ts_type_from_name.rs index 8131a97..ed22474 100644 --- a/tsify-next-macros/src/typescript/ts_type_from_name.rs +++ b/tsify-next-macros/src/typescript/ts_type_from_name.rs @@ -117,6 +117,8 @@ impl TsType { nanos_since_epoch: Self::NUMBER; }, + // Treat as std::ops::Range or std::ops::RangeInclusive only when there is exactly one type parameter. + // Otherwise, consider it a user-defined type and do not perform any conversion. "Range" | "RangeInclusive" if args.len() == 1 => { let start = Self::from_syn_type(config, args[0]); let end = start.clone();