TypeReference
A type reference like Foo[T, P] or int.
import { TypeReference } from "@alloy-js/python";
<TypeReference name={Children} refkey={Refkey} typeArgs={Children[]} />import { TypeReference } from "@alloy-js/python/stc";
TypeReference({ name: Children, refkey: Refkey, typeArgs: Children[],}).children(children)| name | optionalChildrenA raw name to reference when no refkey is provided. |
| refkey | optionalRefkeyA refkey to a declared symbol. |
| typeArgs | optionalChildren[]Type arguments to render inside brackets. |
Remarks
Section titled “Remarks”This component automatically wraps its content in a type reference context,
so any symbols referenced via refkey will be imported as type-only
(inside a if TYPE_CHECKING: block) unless also used as values elsewhere.