News for hackers. Stuff that matters.
Re:I’m porting the TypeScript type checker tsc to Go by reuben364 on Tuesday January 25, 2022 @05:19PM (#30078931)
I've managed to get the compiler to typecheck

  const x: Thing = exprA;
  const y: Thing = exprB;
  const z = [x, y];
but somehow not:

  const z: Thing[] = [exprA, exprB];
although exprA and exprB were pretty nasty typing wise.
Re:I’m porting the TypeScript type checker tsc to Go by azangru on Tuesday January 25, 2022 @06:26PM (#30079608)
> but somehow not: const z: Thing[] = [exprA, exprB];

Doesn't

    const z = [exprA, exprB] as const;
    type GnarlyThingTuple = typeof z;
or something like this help?
Re:I’m porting the TypeScript type checker tsc to Go by halpert on Tuesday January 25, 2022 @07:56PM (#30080304)
Where you trying to create a tuple? Does `const z: [Thing, Thing] = [exprA, exprB];` work?