mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-14 04:39:43 +08:00
- The ratified rename rider (world-unification §7 lane 5): "DOM" collided with the browser DOM and, post-lane-1, the structure is no longer a document tree. Comments and doc prose now say "the checked-dynamic tree" for the noun and "dyn" adjectivally; runtime symbol names (scr_dyn_*), the error.domClone libCall, and the real web DOMException family are unchanged. - The few user-facing strings carrying the nickname move with it (the structuredClone cyclic message, the dc subscriber/publish fences, two emitter ICE texts); diagnostics snapshots regenerated (96 pass). One private compiler constant (DOM_PROTO_METHOD_NAMES -> DYN_PROTO_METHOD_NAMES) rides along. - Mechanical sweep, 142 files, comments/prose only — no behavior change.
13 lines
593 B
TypeScript
13 lines
593 B
TypeScript
// The fences around optional fields. Optional fields themselves compile —
|
|
// record fields AND class fields (undefined-armed union slots; corpus 967
|
|
// and 2047) — and `{a: string}` values COERCE into `{a?: string}` slots
|
|
// (the width-copy field lift). What stays rejected: BARE undefined-armed
|
|
// unions still can't stringify (record FIELDS get Node's drop treatment;
|
|
// the CAST direction compiles now — the checked-dynamic tree holds a first-class undefined
|
|
// value).
|
|
|
|
function mkMaybe(): string | undefined {
|
|
return undefined;
|
|
}
|
|
const stringifyBare = JSON.stringify(mkMaybe());
|