# persistent

Creates a Wire from a DocumentFragment.

If the fragment has only one child, that child is returned directly.
If it has multiple children, they are wrapped in a `Wire` structure (bounded by comments)
to allow them to be treated as a single unit.

## Signatures

```ts
export declare const persistent: (document: Document, templateHash: string, fragment: DocumentFragment) => DocumentFragment | Node | Wire;
```

## Why

The renderer can move multi-node output without adding a layout-affecting
wrapper and without losing identity after fragment insertion.

## Ownership and lifetime

The returned Node, fragment, or Wire contains the exact input children. The
caller's render Scope owns later insertion and removal.

## Examples

```ts
import { persistent } from "@typed/template/Wire"

const templateIdentity = "unique-template-id-or-hash"
const output = persistent(document, templateIdentity, document.createDocumentFragment())
```
