ensureTypeRefContext
Ensure the current component is inside a type ref context. If not it will wrap in a TypeRefContext component. If yes it will not add an extra node and return the original component.
import { ensureTypeRefContext } from "@alloy-js/typescript";
<ensureTypeRefContext tag={symbol} />
import { ensureTypeRefContext } from "@alloy-js/typescript/stc";
ensureTypeRefContext({ undefined: undefined, tag: symbol }).children(children)
tag | optionalsymbol |