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.
11 lines
618 B
TypeScript
11 lines
618 B
TypeScript
const empty = new Array<null>(3).fill(null);
|
|
console.log(JSON.stringify(empty), empty.map((value, index) => String(index) + ":" + String(value === null)).join(","));
|
|
const mixed: (number | null)[] = [1, 2, 3, 4];
|
|
console.log(JSON.stringify(mixed.fill(null, 1, -1)));
|
|
console.log(JSON.stringify(mixed.fill(7, 2)));
|
|
let calls = 0;
|
|
function nil(): null { calls++; return null; }
|
|
console.log(JSON.stringify(mixed.fill(nil())), calls);
|
|
const missing = new Array<undefined>(2).fill(undefined);
|
|
console.log(JSON.stringify(missing), missing.map((value, index) => String(index) + ":" + String(value === undefined)).join(","));
|