mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-01 07:33:12 +08:00
A merged generic record crossing INTO an island — typebox's
`Type.Object(props)` with pi's `Omit<ProviderBase, "retries"> & Extras`
(compat-schema.ts) — was refused with SC8010 ("a native object would cross
as a copy"). exportedByReference, which decides that a native record crosses
as itself, requires the object flag, so an intersection of records fell
through its union test and was refused.
An intersection of the types exportedByReference names is now one of them: a
merged generic record is one native object, and the island reads the
program's own object rather than a copy of it, so an island call over
`props` and over `schema.properties` sees the same object Node does. An
intersection with a primitive arm (`string & {brand}`) stays a primitive and
is copied.
Test: tests/corpus/6900-node-island-merged-record-in (differential to Node,
plain and sanitized).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>