{
  "definitions": [
    {
      "callable": true,
      "callees": [],
      "callers": [
        {
          "file": "core/converters/invocation.converter.ts",
          "name": "takeFlag",
          "source": {
            "href": "https://banes-lab.com/anatomy/argv#file-argv-core-converters-invocation-converter-ts",
            "json": "https://banes-lab.com/json/source/argv/core/converters/invocation.converter.ts",
            "label": "core/converters/invocation.converter.ts",
            "markdown": "https://banes-lab.com/source/argv/core/converters/invocation.converter.ts.md",
            "ref": "anatomy:file-argv-core-converters-invocation-converter-ts"
          }
        },
        {
          "file": "core/converters/invocation.converter.ts",
          "name": "takeFlag",
          "source": {
            "href": "https://banes-lab.com/anatomy/argv#file-argv-core-converters-invocation-converter-ts",
            "json": "https://banes-lab.com/json/source/argv/core/converters/invocation.converter.ts",
            "label": "core/converters/invocation.converter.ts",
            "markdown": "https://banes-lab.com/source/argv/core/converters/invocation.converter.ts.md",
            "ref": "anatomy:file-argv-core-converters-invocation-converter-ts"
          }
        },
        {
          "file": "core/converters/invocation.converter.ts",
          "name": "takeFlag",
          "source": {
            "href": "https://banes-lab.com/anatomy/argv#file-argv-core-converters-invocation-converter-ts",
            "json": "https://banes-lab.com/json/source/argv/core/converters/invocation.converter.ts",
            "label": "core/converters/invocation.converter.ts",
            "markdown": "https://banes-lab.com/source/argv/core/converters/invocation.converter.ts.md",
            "ref": "anatomy:file-argv-core-converters-invocation-converter-ts"
          }
        }
      ],
      "exported": false,
      "flow": "leaf",
      "kind": "lexical_declaration",
      "line": 21,
      "name": "refused",
      "signature": "const refused = function refused(scan: Scan, reason: string): Scan {"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [
        {
          "file": "core/converters/invocation.converter.ts",
          "name": "takeFlag",
          "source": {
            "href": "https://banes-lab.com/anatomy/argv#file-argv-core-converters-invocation-converter-ts",
            "json": "https://banes-lab.com/json/source/argv/core/converters/invocation.converter.ts",
            "label": "core/converters/invocation.converter.ts",
            "markdown": "https://banes-lab.com/source/argv/core/converters/invocation.converter.ts.md",
            "ref": "anatomy:file-argv-core-converters-invocation-converter-ts"
          }
        },
        {
          "file": "core/converters/invocation.converter.ts",
          "name": "takeFlag",
          "source": {
            "href": "https://banes-lab.com/anatomy/argv#file-argv-core-converters-invocation-converter-ts",
            "json": "https://banes-lab.com/json/source/argv/core/converters/invocation.converter.ts",
            "label": "core/converters/invocation.converter.ts",
            "markdown": "https://banes-lab.com/source/argv/core/converters/invocation.converter.ts.md",
            "ref": "anatomy:file-argv-core-converters-invocation-converter-ts"
          }
        }
      ],
      "exported": false,
      "flow": "leaf",
      "kind": "lexical_declaration",
      "line": 25,
      "name": "withFlag",
      "signature": "const withFlag = function withFlag(scan: Scan, word: string, value: string, consumed: number): Scan {"
    },
    {
      "callable": true,
      "callees": [
        {
          "file": "configuration/strings/invocation.strings.ts",
          "name": "missingValue",
          "source": {
            "href": "https://banes-lab.com/anatomy/argv#file-argv-configuration-strings-invocation-strings-ts",
            "json": "https://banes-lab.com/json/source/argv/configuration/strings/invocation.strings.ts",
            "label": "configuration/strings/invocation.strings.ts",
            "markdown": "https://banes-lab.com/source/argv/configuration/strings/invocation.strings.ts.md",
            "ref": "anatomy:file-argv-configuration-strings-invocation-strings-ts"
          }
        },
        {
          "file": "configuration/strings/invocation.strings.ts",
          "name": "repeatedFlag",
          "source": {
            "href": "https://banes-lab.com/anatomy/argv#file-argv-configuration-strings-invocation-strings-ts",
            "json": "https://banes-lab.com/json/source/argv/configuration/strings/invocation.strings.ts",
            "label": "configuration/strings/invocation.strings.ts",
            "markdown": "https://banes-lab.com/source/argv/configuration/strings/invocation.strings.ts.md",
            "ref": "anatomy:file-argv-configuration-strings-invocation-strings-ts"
          }
        },
        {
          "file": "configuration/strings/invocation.strings.ts",
          "name": "undeclaredFlag",
          "source": {
            "href": "https://banes-lab.com/anatomy/argv#file-argv-configuration-strings-invocation-strings-ts",
            "json": "https://banes-lab.com/json/source/argv/configuration/strings/invocation.strings.ts",
            "label": "configuration/strings/invocation.strings.ts",
            "markdown": "https://banes-lab.com/source/argv/configuration/strings/invocation.strings.ts.md",
            "ref": "anatomy:file-argv-configuration-strings-invocation-strings-ts"
          }
        },
        {
          "file": "core/converters/invocation.converter.ts",
          "name": "refused",
          "source": {
            "href": "https://banes-lab.com/anatomy/argv#file-argv-core-converters-invocation-converter-ts",
            "json": "https://banes-lab.com/json/source/argv/core/converters/invocation.converter.ts",
            "label": "core/converters/invocation.converter.ts",
            "markdown": "https://banes-lab.com/source/argv/core/converters/invocation.converter.ts.md",
            "ref": "anatomy:file-argv-core-converters-invocation-converter-ts"
          }
        },
        {
          "file": "core/converters/invocation.converter.ts",
          "name": "refused",
          "source": {
            "href": "https://banes-lab.com/anatomy/argv#file-argv-core-converters-invocation-converter-ts",
            "json": "https://banes-lab.com/json/source/argv/core/converters/invocation.converter.ts",
            "label": "core/converters/invocation.converter.ts",
            "markdown": "https://banes-lab.com/source/argv/core/converters/invocation.converter.ts.md",
            "ref": "anatomy:file-argv-core-converters-invocation-converter-ts"
          }
        },
        {
          "file": "core/converters/invocation.converter.ts",
          "name": "refused",
          "source": {
            "href": "https://banes-lab.com/anatomy/argv#file-argv-core-converters-invocation-converter-ts",
            "json": "https://banes-lab.com/json/source/argv/core/converters/invocation.converter.ts",
            "label": "core/converters/invocation.converter.ts",
            "markdown": "https://banes-lab.com/source/argv/core/converters/invocation.converter.ts.md",
            "ref": "anatomy:file-argv-core-converters-invocation-converter-ts"
          }
        },
        {
          "file": "core/converters/invocation.converter.ts",
          "name": "withFlag",
          "source": {
            "href": "https://banes-lab.com/anatomy/argv#file-argv-core-converters-invocation-converter-ts",
            "json": "https://banes-lab.com/json/source/argv/core/converters/invocation.converter.ts",
            "label": "core/converters/invocation.converter.ts",
            "markdown": "https://banes-lab.com/source/argv/core/converters/invocation.converter.ts.md",
            "ref": "anatomy:file-argv-core-converters-invocation-converter-ts"
          }
        },
        {
          "file": "core/converters/invocation.converter.ts",
          "name": "withFlag",
          "source": {
            "href": "https://banes-lab.com/anatomy/argv#file-argv-core-converters-invocation-converter-ts",
            "json": "https://banes-lab.com/json/source/argv/core/converters/invocation.converter.ts",
            "label": "core/converters/invocation.converter.ts",
            "markdown": "https://banes-lab.com/source/argv/core/converters/invocation.converter.ts.md",
            "ref": "anatomy:file-argv-core-converters-invocation-converter-ts"
          }
        }
      ],
      "callers": [
        {
          "file": "core/converters/invocation.converter.ts",
          "name": "takeWord",
          "source": {
            "href": "https://banes-lab.com/anatomy/argv#file-argv-core-converters-invocation-converter-ts",
            "json": "https://banes-lab.com/json/source/argv/core/converters/invocation.converter.ts",
            "label": "core/converters/invocation.converter.ts",
            "markdown": "https://banes-lab.com/source/argv/core/converters/invocation.converter.ts.md",
            "ref": "anatomy:file-argv-core-converters-invocation-converter-ts"
          }
        }
      ],
      "exported": false,
      "flow": "relay",
      "kind": "lexical_declaration",
      "line": 30,
      "name": "takeFlag",
      "signature": "const takeFlag = function takeFlag(scan: Scan, spec: ArgvSpec, word: string, next: string | undefined): Scan {"
    },
    {
      "callable": true,
      "callees": [
        {
          "file": "core/converters/invocation.converter.ts",
          "name": "restBegins",
          "source": {
            "href": "https://banes-lab.com/anatomy/argv#file-argv-core-converters-invocation-converter-ts",
            "json": "https://banes-lab.com/json/source/argv/core/converters/invocation.converter.ts",
            "label": "core/converters/invocation.converter.ts",
            "markdown": "https://banes-lab.com/source/argv/core/converters/invocation.converter.ts.md",
            "ref": "anatomy:file-argv-core-converters-invocation-converter-ts"
          }
        },
        {
          "file": "core/converters/invocation.converter.ts",
          "name": "takeFlag",
          "source": {
            "href": "https://banes-lab.com/anatomy/argv#file-argv-core-converters-invocation-converter-ts",
            "json": "https://banes-lab.com/json/source/argv/core/converters/invocation.converter.ts",
            "label": "core/converters/invocation.converter.ts",
            "markdown": "https://banes-lab.com/source/argv/core/converters/invocation.converter.ts.md",
            "ref": "anatomy:file-argv-core-converters-invocation-converter-ts"
          }
        }
      ],
      "callers": [
        {
          "file": "core/converters/invocation.converter.ts",
          "name": "parseArgv",
          "source": {
            "href": "https://banes-lab.com/anatomy/argv#file-argv-core-converters-invocation-converter-ts",
            "json": "https://banes-lab.com/json/source/argv/core/converters/invocation.converter.ts",
            "label": "core/converters/invocation.converter.ts",
            "markdown": "https://banes-lab.com/source/argv/core/converters/invocation.converter.ts.md",
            "ref": "anatomy:file-argv-core-converters-invocation-converter-ts"
          }
        }
      ],
      "exported": false,
      "flow": "relay",
      "kind": "lexical_declaration",
      "line": 52,
      "name": "takeWord",
      "signature": "const takeWord = function takeWord(scan: Scan, spec: ArgvSpec, word: string, next: string | undefined): Scan {"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [
        {
          "file": "core/converters/invocation.converter.ts",
          "name": "takeWord",
          "source": {
            "href": "https://banes-lab.com/anatomy/argv#file-argv-core-converters-invocation-converter-ts",
            "json": "https://banes-lab.com/json/source/argv/core/converters/invocation.converter.ts",
            "label": "core/converters/invocation.converter.ts",
            "markdown": "https://banes-lab.com/source/argv/core/converters/invocation.converter.ts.md",
            "ref": "anatomy:file-argv-core-converters-invocation-converter-ts"
          }
        }
      ],
      "exported": false,
      "flow": "leaf",
      "kind": "lexical_declaration",
      "line": 47,
      "name": "restBegins",
      "signature": "const restBegins = function restBegins(scan: Scan, spec: ArgvSpec): boolean {"
    },
    {
      "callable": true,
      "callees": [
        {
          "file": "core/converters/invocation.converter.ts",
          "name": "takeWord",
          "source": {
            "href": "https://banes-lab.com/anatomy/argv#file-argv-core-converters-invocation-converter-ts",
            "json": "https://banes-lab.com/json/source/argv/core/converters/invocation.converter.ts",
            "label": "core/converters/invocation.converter.ts",
            "markdown": "https://banes-lab.com/source/argv/core/converters/invocation.converter.ts.md",
            "ref": "anatomy:file-argv-core-converters-invocation-converter-ts"
          }
        },
        {
          "file": "core/formatters/invocation.formatter.ts",
          "name": "usageOf",
          "source": {
            "href": "https://banes-lab.com/anatomy/argv#file-argv-core-formatters-invocation-formatter-ts",
            "json": "https://banes-lab.com/json/source/argv/core/formatters/invocation.formatter.ts",
            "label": "core/formatters/invocation.formatter.ts",
            "markdown": "https://banes-lab.com/source/argv/core/formatters/invocation.formatter.ts.md",
            "ref": "anatomy:file-argv-core-formatters-invocation-formatter-ts"
          }
        },
        {
          "file": "core/formatters/invocation.formatter.ts",
          "name": "usageOf",
          "source": {
            "href": "https://banes-lab.com/anatomy/argv#file-argv-core-formatters-invocation-formatter-ts",
            "json": "https://banes-lab.com/json/source/argv/core/formatters/invocation.formatter.ts",
            "label": "core/formatters/invocation.formatter.ts",
            "markdown": "https://banes-lab.com/source/argv/core/formatters/invocation.formatter.ts.md",
            "ref": "anatomy:file-argv-core-formatters-invocation-formatter-ts"
          }
        }
      ],
      "callers": [],
      "exported": true,
      "flow": "entry",
      "kind": "lexical_declaration",
      "line": 76,
      "name": "parseArgv",
      "signature": "export const parseArgv = function parseArgv(spec: ArgvSpec, argv: readonly string[]): ArgvOutcome {"
    },
    {
      "callable": true,
      "callees": [
        {
          "file": "configuration/strings/invocation.strings.ts",
          "name": "tooFewPositionals",
          "source": {
            "href": "https://banes-lab.com/anatomy/argv#file-argv-configuration-strings-invocation-strings-ts",
            "json": "https://banes-lab.com/json/source/argv/configuration/strings/invocation.strings.ts",
            "label": "configuration/strings/invocation.strings.ts",
            "markdown": "https://banes-lab.com/source/argv/configuration/strings/invocation.strings.ts.md",
            "ref": "anatomy:file-argv-configuration-strings-invocation-strings-ts"
          }
        },
        {
          "file": "configuration/strings/invocation.strings.ts",
          "name": "tooManyPositionals",
          "source": {
            "href": "https://banes-lab.com/anatomy/argv#file-argv-configuration-strings-invocation-strings-ts",
            "json": "https://banes-lab.com/json/source/argv/configuration/strings/invocation.strings.ts",
            "label": "configuration/strings/invocation.strings.ts",
            "markdown": "https://banes-lab.com/source/argv/configuration/strings/invocation.strings.ts.md",
            "ref": "anatomy:file-argv-configuration-strings-invocation-strings-ts"
          }
        }
      ],
      "callers": [],
      "exported": false,
      "flow": "entry",
      "kind": "lexical_declaration",
      "line": 65,
      "name": "arityRefusal",
      "signature": "const arityRefusal = function arityRefusal(scan: Scan, spec: ArgvSpec): string | null {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "interface_declaration",
      "line": 12,
      "name": "Scan",
      "signature": "interface Scan {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 26,
      "name": "seen",
      "signature": "const seen = scan.flags.get(word) ?? [];"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 31,
      "name": "flag",
      "signature": "const flag = spec.flags.find((held) => held.name === word);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 66,
      "name": "declared",
      "signature": "const declared = spec.positionals ?? [];"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 67,
      "name": "variadic",
      "signature": "const variadic = declared.at(-1)?.variadic === true;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 68,
      "name": "given",
      "signature": "const given = scan.positionals.length;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 72,
      "name": "required",
      "signature": "const required = declared.filter((held) => held.optional !== true).length;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 77,
      "name": "scan",
      "signature": "let scan: Scan = { consumed: 0, flags: new Map(), help: false, positionals: [], refused: null, rest: [] };"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 78,
      "name": "at",
      "signature": "let at = 0;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 86,
      "name": "reason",
      "signature": "const reason = scan.refused ?? arityRefusal(scan, spec);"
    }
  ],
  "document": null,
  "findings": [],
  "generated": false,
  "href": "https://banes-lab.com/anatomy/argv#file-argv-core-converters-invocation-converter-ts",
  "language": "typescript",
  "layer": "processing",
  "name": "invocation.converter.ts",
  "path": "core/converters/invocation.converter.ts",
  "ref": "anatomy:file-argv-core-converters-invocation-converter-ts",
  "relations": [
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/argv#folder-argv-core-converters",
          "json": "https://banes-lab.com/json/anatomy/argv/folder-argv-core-converters",
          "label": "core/converters",
          "markdown": "https://banes-lab.com/anatomy/argv/folder-argv-core-converters.md",
          "ref": "chapter:/anatomy/argv#folder-argv-core-converters"
        }
      ],
      "relation": "contained-in"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/argv#file-argv-configuration-strings-invocation-strings-ts",
          "json": "https://banes-lab.com/json/source/argv/configuration/strings/invocation.strings.ts",
          "label": "configuration/strings/invocation.strings.ts",
          "markdown": "https://banes-lab.com/source/argv/configuration/strings/invocation.strings.ts.md",
          "ref": "anatomy:file-argv-configuration-strings-invocation-strings-ts"
        },
        {
          "href": "https://banes-lab.com/anatomy/argv#file-argv-core-formatters-invocation-formatter-ts",
          "json": "https://banes-lab.com/json/source/argv/core/formatters/invocation.formatter.ts",
          "label": "core/formatters/invocation.formatter.ts",
          "markdown": "https://banes-lab.com/source/argv/core/formatters/invocation.formatter.ts.md",
          "ref": "anatomy:file-argv-core-formatters-invocation-formatter-ts"
        }
      ],
      "relation": "uses"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/argv#folder-argv-configuration-strings",
          "json": "https://banes-lab.com/json/anatomy/argv/folder-argv-configuration-strings",
          "label": "configuration/strings",
          "markdown": "https://banes-lab.com/anatomy/argv/folder-argv-configuration-strings.md",
          "ref": "chapter:/anatomy/argv#folder-argv-configuration-strings"
        },
        {
          "href": "https://banes-lab.com/anatomy/argv#folder-argv-core-converters",
          "json": "https://banes-lab.com/json/anatomy/argv/folder-argv-core-converters",
          "label": "core/converters",
          "markdown": "https://banes-lab.com/anatomy/argv/folder-argv-core-converters.md",
          "ref": "chapter:/anatomy/argv#folder-argv-core-converters"
        },
        {
          "href": "https://banes-lab.com/anatomy/argv#folder-argv-core-formatters",
          "json": "https://banes-lab.com/json/anatomy/argv/folder-argv-core-formatters",
          "label": "core/formatters",
          "markdown": "https://banes-lab.com/anatomy/argv/folder-argv-core-formatters.md",
          "ref": "chapter:/anatomy/argv#folder-argv-core-formatters"
        }
      ],
      "relation": "linked-from"
    }
  ],
  "slots": {
    "concern": "converter",
    "subject": "invocation",
    "variant": null
  },
  "stats": {
    "bytes": 3674,
    "callable": 7,
    "definitions": 17,
    "edges": 15,
    "exported": 4,
    "files": 1,
    "findings": {},
    "flows": {
      "leaf": 3,
      "relay": 2,
      "entry": 2,
      "isolated": 10
    },
    "lines": {
      "blank": 8,
      "code": 83,
      "total": 91
    }
  },
  "summary": "83 lines of code and 17 definitions.",
  "text": "https://banes-lab.com/source/argv/core/converters/invocation.converter.ts.txt",
  "tree": "argv",
  "siblings": {
    "next": null,
    "previous": null
  },
  "up": {
    "href": null,
    "json": "https://banes-lab.com/json/api/source/argv/core/converters",
    "label": "core/converters",
    "markdown": "https://banes-lab.com/api/source/argv/core/converters.md",
    "ref": "api:source/argv/core/converters"
  }
}
