Files
scriptc/tests/corpus/2680-util-parseargs-default.ts
Chris Tate a4e9970119 Support static util.parseArgs (#103)
* Support static util.parseArgs

- Lower typed util.parseArgs calls through the C and LLVM backends.
- Add a link-gated native parser with Node-compatible options, tokens, defaults, and errors.
- Cover ESM, CommonJS, default argv, sanitizer, and TS7 behavior.

* fix(runtime): align parseArgs behavior with Node

* fix(runtime): close parseArgs parity gaps

* fix(runtime): match parseArgs edge cases

* fix(runtime): preserve parseArgs short and default semantics
2026-08-09 08:57:03 -05:00

6 lines
265 B
TypeScript

// Omitted args reads process.argv.slice(2); the corpus run pins the empty
// case, while focused CLI validation invokes the compiled binary with args.
import { parseArgs } from "node:util";
console.log(JSON.stringify(parseArgs({ strict: false, tokens: true })));