Skip to content

TypeRefContext

Set the current context of reference to be type reference.

import { TypeRefContext } from "@alloy-js/python";
<TypeRefContext >
{children}
</TypeRefContext>
childrenChildren

Children

References used inside the children of this component will be treated as type-only references. When a symbol is only referenced in type contexts, it will be imported inside a if TYPE_CHECKING: block.

<TypeRefContext>
{someTypeRefkey}
</TypeRefContext>