mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-04 08:04:37 +08:00
`Promise.resolve(p)` over `Promise<void> | void` — an async callback's declared result — was refused: the maybe-promise detection required every non-promise arm to carry a value, while a nullish arm is exactly what `Promise.resolve` fulfills as undefined. `promiseOrUnitUnionOf` names that shape, and the resolution reuses the existing adopt-or- fulfill path, so the promise arm passes through unchanged (`Promise.resolve(p) === p`). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>