News for hackers. Stuff that matters.
Re:Unconventional Ways to Cast in TypeScript by kerneloops on Saturday October 25, 2025 @12:07PM (#45704914)
Another one:

  const cast: <A, B> (a: A) => B = function <B> (): B {
    return arguments[0]
  }
  const n: string = cast(1)

There are no comments on this comment yet.