InterfaceTypeDeclaration
Wrapper for creating a named interface type declaration.
Properties for creating a named interface type declaration.
This is a combination of InterfaceDeclarationProps and TypeDeclarationProps.
import { InterfaceTypeDeclaration } from "@alloy-js/go";
<InterfaceTypeDeclaration alias doc={Children} name={string | Namekey} refkey={Refkey} refkey={Refkey} singleLine symbol={NamedTypeSymbol} typeParameters={TypeParameterProps[]} />import { InterfaceTypeDeclaration } from "@alloy-js/go/stc";
InterfaceTypeDeclaration({ 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 | optional Children | |
| children | optional Children | Type expression |
| doc | optional Children | Documentation comment |
| name | string | Namekey | Type name |
| refkey | optional Refkey | |
| refkey | optional Refkey | Type refkey |
| singleLine | optional boolean | Whether to render the interface 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 | optional NamedTypeSymbol | Type symbol |
| typeParameters | optional TypeParameterProps[] | Type parameters |