StructTypeDeclaration
Wrapper for creating a named struct type declaration.
Properties for creating a named struct type declaration. This is a combination of StructDeclarationProps and TypeDeclarationProps.
import { StructTypeDeclaration } from "@alloy-js/go";
<StructTypeDeclaration alias doc={Children} name={string | Namekey} refkey={Refkey} refkey={Refkey} singleLine symbol={NamedTypeSymbol} typeParameters={TypeParameterProps[]} />import { StructTypeDeclaration } from "@alloy-js/go/stc";
StructTypeDeclaration({ alias: boolean, doc: Children, name: string | Namekey, refkey: Refkey, refkey: Refkey, singleLine: boolean, symbol: NamedTypeSymbol, typeParameters: TypeParameterProps[],}).children(children)| alias | optional boolean | Whether the type is an alias |
| children | optionalChildren | |
| children | optionalChildren | Type expression |
| doc | optionalChildren | Documentation comment |
| name | string | Namekey | Type name |
| refkey | optionalRefkey | |
| refkey | optionalRefkey | Type refkey |
| singleLine | optional boolean | Whether to render the struct in a single line. This will only compile if children is a single line as well. This is not common in Go, so use with caution. |
| symbol | optionalNamedTypeSymbol | Type symbol |
| typeParameters | optionalTypeParameterProps[] | Type parameters |