Hacker News new | ask | show | jobs
by kerneloops 240 days ago
Another one:

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