MCPcopy Create free account
hub / github.com/arktypeio/arktype / explicitCwdOf

Function explicitCwdOf

ark/type/cli.ts:414–422  ·  view source on GitHub ↗
(args: string[], baseCwd: string)

Source from the content-addressed store, hash-verified

412const aotSubcommands = new Set(["check", "emit", "declare"])
413
414const explicitCwdOf = (args: string[], baseCwd: string): string | undefined => {
415 for (let i = 0; i < args.length; i++) {
416 const arg = args[i]
417 if (arg === "--") break
418 if (arg === "--cwd" && i + 1 < args.length)
419 return resolve(baseCwd, args[i + 1])
420 if (arg.startsWith("--cwd=")) return resolve(baseCwd, arg.slice(6))
421 }
422}
423
424const runAot = (
425 subcommand: string,

Callers 1

runAotFunction · 0.85

Calls 1

resolveFunction · 0.70

Tested by

no test coverage detected