Kind: Class
Source: src/jsx/base.ts
Part of: Jsx
JSXFragmentNode represents a JSX fragment node within the JSX node model. Its toStringToBuffer() method writes the fragment’s string form to the active output buffer instead of returning a string.
Extends: JSXNode
Methods
| Method | Signature | Returns |
|---|---|---|
toStringToBuffer | toStringToBuffer(buffer: StringBufferWithCallbacks) | void |
Diagram
mermaidgraph LR Fragment[JSXFragmentNode] --> Writer[toStringToBuffer()] Writer --> Buffer[Output Buffer]
Usage
tsimport { JSXFragmentNode } from "./jsx/base";
function writeFragment(fragment: JSXFragmentNode): void {
fragment.toStringToBuffer();
}
AI Coding Instructions
- Call
toStringToBuffer()when rendering a fragment through the buffer-based output path. - Do not expect
toStringToBuffer()to return rendered content; it returnsvoid. - Keep fragment rendering consistent with other JSX node types in
src/jsx/base.ts. - Pass
JSXFragmentNodeinstances through code that manages the active output buffer.
Used by
1 reference from 1 file. Each is a place in this repository where the symbol is actually used — go read one rather than trusting an example.
Imported by (1)
Context—src/jsx/context.ts:8
Was this page helpful?