Files
scriptc/tests
Malte UblandClaude Opus 5.5 30e6ca9160 Convert promise and function values into a union's arm of their kind
A promise or function value flowing into a union whose only arm of that
kind has a wider payload or result (`Promise<T>` into `Promise<unknown> |
undefined`, `(s) => Promise<string | null>` into an optional
`(s) => Promise<string | null | undefined>` member) was refused with SC2003:
an arm value wrapped into a union only when the union held an identical
arm. It now takes the arm-level conversion (the checked payload widening,
the function adapter) and wraps the result.

`p === u` against such a union compares both sides as untyped values, so a
promise keeps its identity although converting it into the union's arm
builds a new promise.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 10:07:51 -07:00
..
…
2026-10-25 02:06:50 -05:00