mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-05 08:13:06 +08:00
- Support boolean, bigint, and mixed value keys in native Maps and Sets. - Reuse key hashes and copy collections directly into compact storage. - Preserve collection identity, ordering, iteration, and ownership behavior.
16 lines
515 B
TypeScript
16 lines
515 B
TypeScript
// BigInt itself is static; these adjacent representation boundaries remain
|
|
// explicit refusals until their own coherent families land.
|
|
const typed = new BigInt64Array(4);
|
|
const dynamicValue: unknown = 1n;
|
|
// BigInt keys now compile beside the remaining representation fences.
|
|
const keyed = new Map<bigint, string>();
|
|
keyed.set(1n, "one");
|
|
console.log(JSON.stringify(1n));
|
|
|
|
import { statSync } from "node:fs";
|
|
const stats = statSync(".", { bigint: true });
|
|
console.log(stats.size);
|
|
|
|
void typed;
|
|
void dynamicValue;
|