{
  "type": "module",
  "source": "doc/api/generators-json.md",
  "modules": [
    {
      "textRaw": "`json` Generator",
      "name": "`json`_generator",
      "type": "module",
      "desc": "<p>The <code>json</code> generator writes one JSON document per source file. Each document\nis a tree of the file's headings, in document order, with the metadata,\nsignature or type, Markdown body, and code examples of every one of them.</p>\n<p>The output is described by a JSON schema, published at the URL every document\ncarries in <code>$schema</code>, and shipped with the package as\n<code>@doc-kit/core/generators/json/schema.json</code>.</p>\n<pre><code class=\"language-sh\">npx @doc-kit/cli generate -t json -i \"doc/api/*.md\" -o out\n</code></pre>\n<p>Files keep the input's directory layout: <code>doc/api/some/fs.md</code> becomes <code>out/some/fs.json</code>.</p>",
      "modules": [
        {
          "textRaw": "Configuring",
          "name": "configuring",
          "type": "module",
          "desc": "<ul>\n<li><code>output</code> <code class=\"type\"><a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type\" class=\"type-link\">string</a></code> The directory to write the documents to.</li>\n<li><code>minify</code> <code class=\"type\"><a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#boolean_type\" class=\"type-link\">boolean</a></code> Whether to minify the output. Inherited from <code>global</code>.\n<strong>Default:</strong> <code>true</code>.</li>\n<li><code>repository</code> <code class=\"type\"><a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type\" class=\"type-link\">string</a></code> The <code>owner/name</code> repository source links resolve\nagainst. Inherited from <code>global</code>; without one, <code>sourceLink.url</code> is <code>null</code>.</li>\n<li><code>schemaURL</code> <code class=\"type\"><a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type\" class=\"type-link\">string</a></code> Where the schema is published. <code>{schemaVersion}</code> is\nfilled in. <strong>Default:</strong>\n<code>'https://doc-kit.nodejs.org/schemas/api-doc/{schemaVersion}.json'</code>.</li>\n</ul>",
          "displayName": "Configuring"
        },
        {
          "textRaw": "The document",
          "name": "the_document",
          "type": "module",
          "desc": "<pre><code class=\"language-json\">{\n  \"$schema\": \"https://doc-kit.nodejs.org/schemas/api-doc/1.0.0.json\",\n  \"id\": \"fs\",\n  \"path\": \"/fs\",\n  \"type\": \"module\",\n  \"module\": \"fs\",\n  \"title\": \"File system\",\n  \"introducedIn\": \"v0.10.0\",\n  \"sourceLink\": {\n    \"path\": \"lib/fs.js\",\n    \"url\": \"https://github.com/nodejs/node/blob/HEAD/lib/fs.js\"\n  },\n  \"stability\": { \"index\": \"2\", \"description\": \"Stable\" },\n  \"added\": [],\n  \"deprecated\": [],\n  \"removed\": [],\n  \"napiVersion\": [],\n  \"changes\": [],\n  \"description\": \"The `node:fs` module enables interacting with the file system in a\\nway modeled on standard POSIX functions.\\n\\n…\",\n  \"summary\": \"The `node:fs` module enables interacting with the file system in a way modeled on standard POSIX functions.\",\n  \"examples\": [],\n  \"children\": []\n}\n</code></pre>\n<ul>\n<li><code>id</code> is the file's path, slugged; <code>path</code> is that path without extension.\nCross-document links in Markdown target <code>&#x3C;path>.html</code>.</li>\n<li><code>type</code> is the file's <code>type=</code> directive: <code>module</code> (the default), <code>misc</code>, or\n<code>global</code>. <code>module</code> is the module's name, from the <code>name=</code> directive.</li>\n<li><code>introducedIn</code> and <code>sourceLink</code> are the <code>introduced_in=</code> and <code>source_link=</code>\ndirectives.</li>\n<li>Everything from <code>title</code> on is what every heading carries, described below.</li>\n<li><code>children</code> are the file's headings, nested by depth.</li>\n</ul>",
          "displayName": "The document"
        },
        {
          "textRaw": "Every entry",
          "name": "every_entry",
          "type": "module",
          "desc": "<p>The document and every node carry:</p>\n<ul>\n<li><code>title</code> The heading text as authored, inline Markdown included.</li>\n<li><code>stability</code> The stability index, or <code>null</code>: <code>{ index, description }</code>,\nwhere <code>index</code> is the text as authored (<code>\"1.1\"</code>) and <code>description</code> the\nMarkdown after it.</li>\n<li><code>added</code>, <code>deprecated</code>, <code>removed</code> Arrays of version strings, as authored.</li>\n<li><code>napiVersion</code> An array of numbers.</li>\n<li><code>changes</code> The change history: <code>{ versions, prUrl, commit, description }</code>.</li>\n<li><code>description</code> The body as Markdown: everything under the heading except\nits metadata, its stability index, and the typed list a signature or type\nwas taken from. Links are rewritten as they are for HTML output.</li>\n<li><code>summary</code> A plain-text paragraph: the <code>llm_description</code> when there is one,\nelse the first paragraph.</li>\n<li><code>examples</code> The fenced code blocks of the body, <code>{ language, displayName, code }</code>.\nThey stay in the description too.</li>\n</ul>\n<p>Every key is always present. What is missing is <code>null</code> or an empty array.</p>",
          "displayName": "Every entry"
        },
        {
          "textRaw": "Nodes",
          "name": "nodes",
          "type": "module",
          "desc": "<p>A node is a heading below the title. Its <code>kind</code> says what the heading\ndocuments, and decides which further properties it has:</p>\n<table>\n<thead>\n<tr>\n<th><code>kind</code></th>\n<th>Heading</th>\n<th>Further properties</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>section</code></td>\n<td>Anything else: prose, <code>DEP0005: …</code>, <code>--flag</code></td>\n<td>none</td>\n</tr>\n<tr>\n<td><code>class</code></td>\n<td><code>Class: `net.Server`</code></td>\n<td><code>extends</code> (<code>Type</code> or <code>null</code>)</td>\n</tr>\n<tr>\n<td><code>constructor</code></td>\n<td><code>`new Agent([options])`</code></td>\n<td><code>signature</code></td>\n</tr>\n<tr>\n<td><code>method</code></td>\n<td><code>`fs.readFile(path[, options], callback)`</code></td>\n<td><code>signature</code></td>\n</tr>\n<tr>\n<td><code>staticMethod</code></td>\n<td><code>Static method: `Buffer.from(string)`</code></td>\n<td><code>signature</code></td>\n</tr>\n<tr>\n<td><code>property</code></td>\n<td><code>`buf.length`</code></td>\n<td><code>type</code>, <code>default</code></td>\n</tr>\n<tr>\n<td><code>event</code></td>\n<td><code>Event: `'close'`</code></td>\n<td><code>parameters</code></td>\n</tr>\n</tbody>\n</table>\n<p>Every node also has:</p>\n<ul>\n<li><code>id</code> The heading's slug, and its anchor in HTML output.</li>\n<li><code>name</code> The bare identifier: <code>readFile</code>, <code>Server</code>, <code>close</code>. A section's\nplain heading text. A <code>name=</code> directive overrides it.</li>\n<li><code>scope</code> <code>module</code>, or <code>global</code> for entries typed <code>global</code>.</li>\n<li><code>overloadOf</code> When several sibling headings document one callable, the <code>id</code>\nof the first on the second and later ones; otherwise <code>null</code>.</li>\n<li><code>children</code> The headings nested under it.</li>\n</ul>",
          "displayName": "Nodes"
        },
        {
          "textRaw": "Signatures and types",
          "name": "signatures_and_types",
          "type": "module",
          "desc": "<pre><code class=\"language-json\">\"signature\": {\n  \"parameters\": [\n    {\n      \"name\": \"options\",\n      \"type\": { \"text\": \"Object | string\", \"links\": [{ \"name\": \"Object\", \"href\": \"https://developer.mozilla.org/…\", \"start\": 0, \"end\": 6 }] },\n      \"description\": \"\",\n      \"default\": null,\n      \"optional\": true,\n      \"rest\": false,\n      \"properties\": [\n        { \"name\": \"encoding\", \"type\": { \"text\": \"string | null\", \"links\": [] }, \"description\": \"\", \"default\": \"null\", \"optional\": true, \"rest\": false, \"properties\": [] }\n      ]\n    }\n  ],\n  \"returns\": { \"type\": { \"text\": \"Promise\", \"links\": [] }, \"description\": \"Fulfills upon success.\" }\n}\n</code></pre>\n<ul>\n<li>A signature's <code>parameters</code> are the ones the heading declares,\ndescribed by the typed list under it. <code>optional</code> is set for parameters\nbracketed in the heading or documented with a default; <code>rest</code> for\n<code>...args</code>. <code>properties</code> are the nested list items: the properties of an\noptions object, or the arguments of a callback.</li>\n<li><code>returns</code> is the <code>Returns:</code> item, or <code>null</code>.</li>\n<li>A <code>Type</code> is the annotation's TypeScript text, normalised to one line with\n<code>|</code> between union members, plus the names in it that resolved to\ndocumentation, with their character offsets. A type that was not\ndocumented is <code>null</code>, never guessed.</li>\n<li>An event's <code>parameters</code> are the arguments its listeners receive.</li>\n</ul>",
          "displayName": "Signatures and types"
        },
        {
          "textRaw": "The schema",
          "name": "the_schema",
          "type": "module",
          "desc": "<p><code>schema.json</code> is the source of truth. After changing it, bump its <code>$id</code> and\n<code>SCHEMA_VERSION</code> in <code>constants.mjs</code> together, and regenerate the types:</p>\n<pre><code class=\"language-sh\">node scripts/generate-json-types.mjs\n</code></pre>",
          "displayName": "The schema"
        }
      ],
      "displayName": "`json` Generator"
    }
  ]
}