typia icon indicating copy to clipboard operation
typia copied to clipboard

Number with tags in template literal

Open phuoccss opened this issue 5 months ago • 3 comments

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

phuoccss avatar Jun 20 '26 14:06 phuoccss

No, not working. No way in the Test2 case.

samchon avatar Jun 20 '26 15:06 samchon

thank you.

phuoccss avatar Jun 21 '26 13:06 phuoccss

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.

samchon avatar Jun 21 '26 15:06 samchon