{
  "id": "@typed/template#Template",
  "canonicalId": "@typed/template#Template",
  "symbol": {
    "id": "@typed/template#Template",
    "packageName": "@typed/template",
    "moduleName": ".",
    "exportName": "Template",
    "kind": "class",
    "signatures": [
      "export declare class Template implements Inspectable {\n    readonly _tag = \"template\";\n    readonly nodes: ReadonlyArray<Node>;\n    readonly hash: string;\n    readonly parts: ReadonlyArray<readonly [\n        part: PartNode | SparsePartNode,\n        path: Array<number>\n    ]>;\n    constructor(nodes: ReadonlyArray<Node>, hash: string, parts: ReadonlyArray<readonly [\n        part: PartNode | SparsePartNode,\n        path: Array<number>\n    ]>);\n    toJSON(): {\n        _tag: string;\n        nodes: readonly Node[];\n        hash: string;\n        parts: readonly (readonly [\n            part: PartNode | SparsePartNode,\n            path: number[]\n        ])[];\n    };\n    [NodeInspectSymbol](): {\n        _tag: string;\n        nodes: readonly Node[];\n        hash: string;\n        parts: readonly (readonly [\n            part: PartNode | SparsePartNode,\n            path: number[]\n        ])[];\n    };\n}"
    ],
    "summary": "Represents a parsed HTML template.\n\nA `Template` instance contains the static structure of an HTML template (nodes)\nand metadata about dynamic parts (interpolation points).",
    "sections": {
      "Why": "The parsed AST is the shared contract for DOM compilation, streamed SSR, and\nhydration hashes. Renderer authors can inspect every static node and dynamic\npath instead of relying on hidden compiler machinery.",
      "Ownership and lifetime": "A Template owns its arrays and scalar metadata but no DOM nodes, subscriptions,\nlisteners, or Scope. Render layers may cache compiled forms by literal identity.",
      "Constructor": "Creates a parsed Template from explicit AST, hash, and part paths.",
      "Constructor: Why": "Parser and renderer tooling can construct the complete public model directly.",
      "Constructor: Ownership and lifetime": "The instance retains the supplied arrays and owns no renderer resource.",
      "Method: [[computed:[NodeInspectSymbol]]]": "Supplies Effect's Node inspection protocol.",
      "Method: [[computed:[NodeInspectSymbol]]]: Why": "Debug output uses the same public JSON structure.",
      "Method: [[computed:[NodeInspectSymbol]]]: Ownership and lifetime": "Delegates to `toJSON` and acquires nothing.",
      "Property: _tag": "AST discriminant used by inspectors and renderer tooling.",
      "Property: _tag: Why": "Enables exhaustive structural inspection.",
      "Property: _tag: Ownership and lifetime": "Immutable metadata for this parsed template.",
      "Property: hash": "A unique hash representing the template content. Used for caching and hydration.",
      "Property: hash: Why": "Matches compiled SSR ranges to the same authored literal during hydration.",
      "Property: hash: Ownership and lifetime": "Immutable metadata for the Template lifetime.",
      "Property: nodes": "The root nodes of the template.",
      "Property: nodes: Why": "Defines the exact authored root structure shared by all renderers.",
      "Property: nodes: Ownership and lifetime": "The Template retains this parsed array, not live DOM.",
      "Property: parts": "A list of dynamic parts in the template.\nEach part is associated with a path (array of indices) to locate the corresponding\nnode in the DOM tree.",
      "Property: parts: Why": "Direct paths let compilers capture precise update targets once.",
      "Property: parts: Ownership and lifetime": "The Template retains parsed paths; render Scopes own live part instances.",
      "Method: toJSON": "Returns the stable inspectable representation of this AST.",
      "Method: toJSON: Why": "Tooling can inspect compiler output without accessing private state.",
      "Method: toJSON: Ownership and lifetime": "Returns references to immutable parsed data; no DOM is created."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { parse } from \"@typed/template/Parser\"\n\n// Array boundaries describe interpolation positions; values are rendered later.\nconst template = parse([\"<div>Hello \", \"</div>\"])\n\n// Access template structure\nconsole.log(template.nodes) // Array of parsed nodes\nconsole.log(template.parts) // Array of dynamic parts\nconsole.log(template.hash) // Unique hash for caching"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/template/src/Template.ts",
      "line": 37
    },
    "since": "1.0.0",
    "category": "Template structure"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/template#Template",
    "packageName": "@typed/template",
    "packageVersion": "1.0.0-beta.7",
    "moduleName": ".",
    "consumerSpecifier": "@typed/template",
    "exportName": "Template",
    "qualifiedName": "Template",
    "declarationKey": "declaration:39b7a94cd8ad89637726f099",
    "family": "class",
    "signatures": [
      "export declare class Template implements Inspectable {\n    readonly _tag = \"template\";\n    readonly nodes: ReadonlyArray<Node>;\n    readonly hash: string;\n    readonly parts: ReadonlyArray<readonly [\n        part: PartNode | SparsePartNode,\n        path: Array<number>\n    ]>;\n    constructor(nodes: ReadonlyArray<Node>, hash: string, parts: ReadonlyArray<readonly [\n        part: PartNode | SparsePartNode,\n        path: Array<number>\n    ]>);\n    toJSON(): {\n        _tag: string;\n        nodes: readonly Node[];\n        hash: string;\n        parts: readonly (readonly [\n            part: PartNode | SparsePartNode,\n            path: number[]\n        ])[];\n    };\n    [NodeInspectSymbol](): {\n        _tag: string;\n        nodes: readonly Node[];\n        hash: string;\n        parts: readonly (readonly [\n            part: PartNode | SparsePartNode,\n            path: number[]\n        ])[];\n    };\n}"
    ],
    "sourceSpans": [
      {
        "file": "packages/template/src/Template.ts",
        "start": {
          "line": 37,
          "column": 1
        },
        "end": {
          "line": 136,
          "column": 2
        }
      },
      {
        "file": "packages/template/dist/Template.d.ts",
        "start": {
          "line": 91,
          "column": 5
        },
        "end": {
          "line": 91,
          "column": 146
        }
      },
      {
        "file": "packages/template/src/Template.ts",
        "start": {
          "line": 133,
          "column": 3
        },
        "end": {
          "line": 135,
          "column": 4
        }
      },
      {
        "file": "packages/template/src/Template.ts",
        "start": {
          "line": 47,
          "column": 3
        },
        "end": {
          "line": 47,
          "column": 30
        }
      },
      {
        "file": "packages/template/src/Template.ts",
        "start": {
          "line": 71,
          "column": 3
        },
        "end": {
          "line": 71,
          "column": 25
        }
      },
      {
        "file": "packages/template/src/Template.ts",
        "start": {
          "line": 59,
          "column": 3
        },
        "end": {
          "line": 59,
          "column": 39
        }
      },
      {
        "file": "packages/template/src/Template.ts",
        "start": {
          "line": 85,
          "column": 3
        },
        "end": {
          "line": 85,
          "column": 98
        }
      },
      {
        "file": "packages/template/src/Template.ts",
        "start": {
          "line": 115,
          "column": 3
        },
        "end": {
          "line": 122,
          "column": 4
        }
      }
    ],
    "aliases": [
      "@typed/template/Template#Template"
    ],
    "isAlias": false,
    "static": false
  },
  "declaration": {
    "declarationKey": "declaration:39b7a94cd8ad89637726f099",
    "name": "Template",
    "family": "class",
    "facets": [
      {
        "family": "class",
        "syntaxKind": "ClassDeclaration",
        "signatures": [
          "export declare class Template implements Inspectable {\n    readonly _tag = \"template\";\n    readonly nodes: ReadonlyArray<Node>;\n    readonly hash: string;\n    readonly parts: ReadonlyArray<readonly [\n        part: PartNode | SparsePartNode,\n        path: Array<number>\n    ]>;\n    constructor(nodes: ReadonlyArray<Node>, hash: string, parts: ReadonlyArray<readonly [\n        part: PartNode | SparsePartNode,\n        path: Array<number>\n    ]>);\n    toJSON(): {\n        _tag: string;\n        nodes: readonly Node[];\n        hash: string;\n        parts: readonly (readonly [\n            part: PartNode | SparsePartNode,\n            path: number[]\n        ])[];\n    };\n    [NodeInspectSymbol](): {\n        _tag: string;\n        nodes: readonly Node[];\n        hash: string;\n        parts: readonly (readonly [\n            part: PartNode | SparsePartNode,\n            path: number[]\n        ])[];\n    };\n}"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/template/src/Template.ts",
            "start": {
              "line": 37,
              "column": 1
            },
            "end": {
              "line": 136,
              "column": 2
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      },
      {
        "family": "constructor",
        "syntaxKind": "Constructor",
        "signatures": [
          "constructor(nodes: ReadonlyArray<Node>, hash: string, parts: ReadonlyArray<readonly [\n    part: PartNode | SparsePartNode,\n    path: Array<number>\n]>);"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/template/dist/Template.d.ts",
            "start": {
              "line": 91,
              "column": 5
            },
            "end": {
              "line": 91,
              "column": 146
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      },
      {
        "family": "method",
        "syntaxKind": "MethodDeclaration",
        "signatures": [
          "[NodeInspectSymbol](): {\n    _tag: string;\n    nodes: readonly Node[];\n    hash: string;\n    parts: readonly (readonly [\n        part: PartNode | SparsePartNode,\n        path: number[]\n    ])[];\n};"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/template/src/Template.ts",
            "start": {
              "line": 133,
              "column": 3
            },
            "end": {
              "line": 135,
              "column": 4
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      },
      {
        "family": "property",
        "syntaxKind": "PropertyDeclaration",
        "signatures": [
          "readonly _tag = \"template\";"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/template/src/Template.ts",
            "start": {
              "line": 47,
              "column": 3
            },
            "end": {
              "line": 47,
              "column": 30
            }
          }
        ],
        "static": false,
        "readonly": true,
        "optional": false
      },
      {
        "family": "property",
        "syntaxKind": "PropertyDeclaration",
        "signatures": [
          "readonly hash: string;"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/template/src/Template.ts",
            "start": {
              "line": 71,
              "column": 3
            },
            "end": {
              "line": 71,
              "column": 25
            }
          }
        ],
        "static": false,
        "readonly": true,
        "optional": false
      },
      {
        "family": "property",
        "syntaxKind": "PropertyDeclaration",
        "signatures": [
          "readonly nodes: ReadonlyArray<Node>;"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/template/src/Template.ts",
            "start": {
              "line": 59,
              "column": 3
            },
            "end": {
              "line": 59,
              "column": 39
            }
          }
        ],
        "static": false,
        "readonly": true,
        "optional": false
      },
      {
        "family": "property",
        "syntaxKind": "PropertyDeclaration",
        "signatures": [
          "readonly parts: ReadonlyArray<readonly [\n    part: PartNode | SparsePartNode,\n    path: Array<number>\n]>;"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/template/src/Template.ts",
            "start": {
              "line": 85,
              "column": 3
            },
            "end": {
              "line": 85,
              "column": 98
            }
          }
        ],
        "static": false,
        "readonly": true,
        "optional": false
      },
      {
        "family": "method",
        "syntaxKind": "MethodDeclaration",
        "signatures": [
          "toJSON(): {\n    _tag: string;\n    nodes: readonly Node[];\n    hash: string;\n    parts: readonly (readonly [\n        part: PartNode | SparsePartNode,\n        path: number[]\n    ])[];\n};"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/template/src/Template.ts",
            "start": {
              "line": 115,
              "column": 3
            },
            "end": {
              "line": 122,
              "column": 4
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      }
    ],
    "signatures": [
      "export declare class Template implements Inspectable {\n    readonly _tag = \"template\";\n    readonly nodes: ReadonlyArray<Node>;\n    readonly hash: string;\n    readonly parts: ReadonlyArray<readonly [\n        part: PartNode | SparsePartNode,\n        path: Array<number>\n    ]>;\n    constructor(nodes: ReadonlyArray<Node>, hash: string, parts: ReadonlyArray<readonly [\n        part: PartNode | SparsePartNode,\n        path: Array<number>\n    ]>);\n    toJSON(): {\n        _tag: string;\n        nodes: readonly Node[];\n        hash: string;\n        parts: readonly (readonly [\n            part: PartNode | SparsePartNode,\n            path: number[]\n        ])[];\n    };\n    [NodeInspectSymbol](): {\n        _tag: string;\n        nodes: readonly Node[];\n        hash: string;\n        parts: readonly (readonly [\n            part: PartNode | SparsePartNode,\n            path: number[]\n        ])[];\n    };\n}"
    ],
    "typeParameters": [],
    "summary": "Represents a parsed HTML template.\n\nA `Template` instance contains the static structure of an HTML template (nodes)\nand metadata about dynamic parts (interpolation points).",
    "sections": {
      "Why": "The parsed AST is the shared contract for DOM compilation, streamed SSR, and\nhydration hashes. Renderer authors can inspect every static node and dynamic\npath instead of relying on hidden compiler machinery.",
      "Ownership and lifetime": "A Template owns its arrays and scalar metadata but no DOM nodes, subscriptions,\nlisteners, or Scope. Render layers may cache compiled forms by literal identity.",
      "Constructor": "Creates a parsed Template from explicit AST, hash, and part paths.",
      "Constructor: Why": "Parser and renderer tooling can construct the complete public model directly.",
      "Constructor: Ownership and lifetime": "The instance retains the supplied arrays and owns no renderer resource.",
      "Method: [[computed:[NodeInspectSymbol]]]": "Supplies Effect's Node inspection protocol.",
      "Method: [[computed:[NodeInspectSymbol]]]: Why": "Debug output uses the same public JSON structure.",
      "Method: [[computed:[NodeInspectSymbol]]]: Ownership and lifetime": "Delegates to `toJSON` and acquires nothing.",
      "Property: _tag": "AST discriminant used by inspectors and renderer tooling.",
      "Property: _tag: Why": "Enables exhaustive structural inspection.",
      "Property: _tag: Ownership and lifetime": "Immutable metadata for this parsed template.",
      "Property: hash": "A unique hash representing the template content. Used for caching and hydration.",
      "Property: hash: Why": "Matches compiled SSR ranges to the same authored literal during hydration.",
      "Property: hash: Ownership and lifetime": "Immutable metadata for the Template lifetime.",
      "Property: nodes": "The root nodes of the template.",
      "Property: nodes: Why": "Defines the exact authored root structure shared by all renderers.",
      "Property: nodes: Ownership and lifetime": "The Template retains this parsed array, not live DOM.",
      "Property: parts": "A list of dynamic parts in the template.\nEach part is associated with a path (array of indices) to locate the corresponding\nnode in the DOM tree.",
      "Property: parts: Why": "Direct paths let compilers capture precise update targets once.",
      "Property: parts: Ownership and lifetime": "The Template retains parsed paths; render Scopes own live part instances.",
      "Method: toJSON": "Returns the stable inspectable representation of this AST.",
      "Method: toJSON: Why": "Tooling can inspect compiler output without accessing private state.",
      "Method: toJSON: Ownership and lifetime": "Returns references to immutable parsed data; no DOM is created."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { parse } from \"@typed/template/Parser\"\n\n// Array boundaries describe interpolation positions; values are rendered later.\nconst template = parse([\"<div>Hello \", \"</div>\"])\n\n// Access template structure\nconsole.log(template.nodes) // Array of parsed nodes\nconsole.log(template.parts) // Array of dynamic parts\nconsole.log(template.hash) // Unique hash for caching"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/template/src/Template.ts",
        "start": {
          "line": 37,
          "column": 1
        },
        "end": {
          "line": 136,
          "column": 2
        }
      },
      {
        "file": "packages/template/dist/Template.d.ts",
        "start": {
          "line": 91,
          "column": 5
        },
        "end": {
          "line": 91,
          "column": 146
        }
      },
      {
        "file": "packages/template/src/Template.ts",
        "start": {
          "line": 133,
          "column": 3
        },
        "end": {
          "line": 135,
          "column": 4
        }
      },
      {
        "file": "packages/template/src/Template.ts",
        "start": {
          "line": 47,
          "column": 3
        },
        "end": {
          "line": 47,
          "column": 30
        }
      },
      {
        "file": "packages/template/src/Template.ts",
        "start": {
          "line": 71,
          "column": 3
        },
        "end": {
          "line": 71,
          "column": 25
        }
      },
      {
        "file": "packages/template/src/Template.ts",
        "start": {
          "line": 59,
          "column": 3
        },
        "end": {
          "line": 59,
          "column": 39
        }
      },
      {
        "file": "packages/template/src/Template.ts",
        "start": {
          "line": 85,
          "column": 3
        },
        "end": {
          "line": 85,
          "column": 98
        }
      },
      {
        "file": "packages/template/src/Template.ts",
        "start": {
          "line": 115,
          "column": 3
        },
        "end": {
          "line": 122,
          "column": 4
        }
      }
    ],
    "since": "1.0.0",
    "category": "Template structure"
  }
}
