mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-02 08:35:07 +08:00
* feat: ship the self-hosted native scriptc CLI - Run the shared compiler and CLI natively, including library builds and compile-time evaluation. - Install native platform packages and ship relocatable standalone distributions. - Preserve program semantics and reuse validated build artifacts for fast rebuilds. * fix: complete native CLI integration and validation - Preserve library diagnostics and run recursive compiler work on the main stack. - Restore packaged helper permissions and exercise native npm and Wasm library builds. - Recover interrupted Sandbox status probes within the original command deadline.
10 lines
801 B
TypeScript
10 lines
801 B
TypeScript
const records: { first: number; second: number }[] = [{ first: 1, second: 2 }];
|
|
for (const record of records) console.log(Object.keys(record).join(","), Object.values(record).join(","), JSON.stringify(Object.entries(record)));
|
|
const dictionaries: Record<string, number>[] = [{ b: 2, a: 1 }];
|
|
for (const dict of dictionaries) console.log(Object.keys(dict).join(","), Object.values(dict).join(","), JSON.stringify(Object.entries(dict)));
|
|
const empty: Record<string, number>[] = [];
|
|
try { console.log(Object.values(empty[0])); }
|
|
catch (error) { console.log(error instanceof TypeError, error instanceof Error ? error.message : "unexpected"); }
|
|
try { console.log(Object.keys(records[20])); }
|
|
catch (error) { console.log(error instanceof TypeError, error instanceof Error ? error.message : "unexpected"); }
|