Skip to content

Commit

Permalink
Add a comment on the intent of args check
Browse files Browse the repository at this point in the history
  • Loading branch information
todays-mitsui committed Nov 17, 2024
1 parent 92a62aa commit d9c0a86
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tsify-next-macros/src/typescript/ts_type_from_name.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit d9c0a86

Please sign in to comment.