Skip to main content
Module

x/jsx_stream/types.ts>TagHooks

JSX runtime for server-side only async streaming
Latest
interface TagHooks
import { type TagHooks } from "https://deno.land/x/jsx_stream@v0.2.0/types.ts";

Properties

optional
beforeStart: (openTag: Tag, context: Context) => Node | void
optional
afterStart: (openTag: Tag, context: Context) => Node | void
optional
beforeEnd: (
openTag: Tag,
context: Context,
tokens?: Token[],
) => Node | void
optional
afterEnd: (
openTag: Tag,
context: Context,
tokens?: Token[],
) => Node | void
optional
collectTokens: boolean

Declare that all tokens within an element (including the element tags themselves) should be collected and passed into the beforeEnd/afterEnd hook.