Skip to content

Declaration

A Python declaration, which can be a class, function, variable, etc.

import { Declaration } from "@alloy-js/python";
<Declaration
name={string | Namekey}
nameKind={PythonElements}
symbol={PythonOutputSymbol}
/>
nameoptional string | NamekeyThe name of this declaration.
nameKindoptional PythonElementsThe name policy kind to apply to the declaration.
symboloptional PythonOutputSymbolThe symbol to use for this declaration.

This component is used to create a declaration with a symbol that can be referenced in the code.