Files
Chris Tate c257368c5e Compile Effect generators statically (#589)
* Compile Effect generators statically

* test: declare the dormant array write's expected fence
2026-09-30 14:25:29 -05:00

15 lines
437 B
TypeScript

import { useMap, copyMap } from "./consumer.js";
const map = new Map<unknown, unknown>();
const boxed: unknown = map;
console.log(boxed instanceof Map, String(boxed));
useMap(boxed);
copyMap(boxed);
console.log(map.size, map.get("key"), map.get(NaN), map.has(undefined));
const restored = boxed as Map<unknown, unknown>;
console.log(restored === map);
restored.set("from typed", 123);
useMap(boxed);
map.clear();
console.log(map.size);