mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-01 07:33:12 +08:00
`Promise<A | B> | undefined` awaits as Awaited of the operand, which the maybe-promise lowering already computes: it awaits the narrowed promise arm and coerces its settled union, and the non-promise arms take JS's one microtask hop. The await lowering refused any union inner instead, so the promise-or-unit shape now goes through that same path; a union whose promise arm has no combined result keeps the SC1090 fence. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>