typia
typia copied to clipboard
Number with tags in template literal
Is it supposed to work?
type SameType<A, B> = [A] extends [B]
? [B] extends [A]
? true
: false
: false
type Test1 = SameType<
number,
number & tags.Minimum<0> & tags.Maximum<100>
> // true
type Test2 = SameType<
`${number}%`,
`${number & tags.Minimum<0> & tags.Maximum<100>}%`
> // false
No, not working. No way in the Test2 case.
thank you.
Reopened. The full challenge briefing — verified current behavior, code map, and the implementation context for an AI-assisted attempt — is tracked in #1968. Continuing there.