Skip to content

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[]}
/>
aliasoptional booleanWhether the type is an alias
childrenoptional Children
childrenoptional ChildrenType expression
docoptional ChildrenDocumentation comment
namestring | NamekeyType name
refkeyoptional Refkey
refkeyoptional RefkeyType refkey
singleLineoptional booleanWhether 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.
symboloptional NamedTypeSymbolType symbol
typeParametersoptional TypeParameterProps[]Type parameters