{
  "id": "@typed/template#persistent",
  "canonicalId": "@typed/template#persistent",
  "symbol": {
    "id": "@typed/template#persistent",
    "packageName": "@typed/template",
    "moduleName": ".",
    "exportName": "persistent",
    "kind": "constant",
    "signatures": [
      "export declare const persistent: (document: Document, templateHash: string, fragment: DocumentFragment) => DocumentFragment | Node | Wire;"
    ],
    "summary": "Creates a Wire from a DocumentFragment.\n\nIf the fragment has only one child, that child is returned directly.\nIf it has multiple children, they are wrapped in a `Wire` structure (bounded by comments)\nto allow them to be treated as a single unit.",
    "sections": {
      "Why": "The renderer can move multi-node output without adding a layout-affecting\nwrapper and without losing identity after fragment insertion.",
      "Ownership and lifetime": "The returned Node, fragment, or Wire contains the exact input children. The\ncaller's render Scope owns later insertion and removal."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { persistent } from \"@typed/template/Wire\"\n\nconst templateIdentity = \"unique-template-id-or-hash\"\nconst output = persistent(document, templateIdentity, document.createDocumentFragment())"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/template/src/Wire.ts",
      "line": 209
    },
    "since": "1.0.0",
    "category": "Persistent DOM ranges"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/template#persistent",
    "packageName": "@typed/template",
    "packageVersion": "1.0.0-beta.7",
    "moduleName": ".",
    "consumerSpecifier": "@typed/template",
    "exportName": "persistent",
    "qualifiedName": "persistent",
    "declarationKey": "declaration:901f6e15e37c5420b54e4cac",
    "family": "variable",
    "signatures": [
      "export declare const persistent: (document: Document, templateHash: string, fragment: DocumentFragment) => DocumentFragment | Node | Wire;"
    ],
    "sourceSpans": [
      {
        "file": "packages/template/src/Wire.ts",
        "start": {
          "line": 209,
          "column": 14
        },
        "end": {
          "line": 221,
          "column": 2
        }
      }
    ],
    "aliases": [
      "@typed/template/Wire#persistent"
    ],
    "isAlias": false,
    "static": false
  },
  "declaration": {
    "declarationKey": "declaration:901f6e15e37c5420b54e4cac",
    "name": "persistent",
    "family": "variable",
    "facets": [
      {
        "family": "variable",
        "syntaxKind": "VariableDeclaration",
        "signatures": [
          "export declare const persistent: (document: Document, templateHash: string, fragment: DocumentFragment) => DocumentFragment | Node | Wire;"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/template/src/Wire.ts",
            "start": {
              "line": 209,
              "column": 14
            },
            "end": {
              "line": 221,
              "column": 2
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      }
    ],
    "signatures": [
      "export declare const persistent: (document: Document, templateHash: string, fragment: DocumentFragment) => DocumentFragment | Node | Wire;"
    ],
    "typeParameters": [],
    "summary": "Creates a Wire from a DocumentFragment.\n\nIf the fragment has only one child, that child is returned directly.\nIf it has multiple children, they are wrapped in a `Wire` structure (bounded by comments)\nto allow them to be treated as a single unit.",
    "sections": {
      "Why": "The renderer can move multi-node output without adding a layout-affecting\nwrapper and without losing identity after fragment insertion.",
      "Ownership and lifetime": "The returned Node, fragment, or Wire contains the exact input children. The\ncaller's render Scope owns later insertion and removal."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { persistent } from \"@typed/template/Wire\"\n\nconst templateIdentity = \"unique-template-id-or-hash\"\nconst output = persistent(document, templateIdentity, document.createDocumentFragment())"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/template/src/Wire.ts",
        "start": {
          "line": 209,
          "column": 14
        },
        "end": {
          "line": 221,
          "column": 2
        }
      }
    ],
    "since": "1.0.0",
    "category": "Persistent DOM ranges"
  }
}
