Skip to content

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} />
tagoptionalsymbol