mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-28 06:53:42 +08:00
13 lines
396 B
JavaScript
13 lines
396 B
JavaScript
// An any-typed config is engine-backed in the dynamic tier. The static
|
|
// util.parseArgs spoke must snapshot its documented members before parsing.
|
|
import { parseArgs } from "node:util";
|
|
|
|
const config = /** @type {any} */ ({
|
|
args: ["--name=codex", "tail"],
|
|
options: { name: { type: "string" } },
|
|
allowPositionals: true,
|
|
tokens: true,
|
|
});
|
|
|
|
console.log(JSON.stringify(parseArgs(config)));
|