Skip to content

InterfaceMember

Create a TypeScript interface member.

An interface member can either provide a name prop to create a named property, or an indexer prop to define an indexer for the interface.

The type of the member can be provided either as the type prop or as the children of the component.

import { InterfaceMember } from "@alloy-js/typescript";
<InterfaceMember
doc={Children}
indexer={Children}
name="string"
optional
readonly
refkey={Refkey | Refkey[]}
type={Children}
>
{children}
</InterfaceMember>

Props

childrenoptionalChildren
docoptionalChildren
indexeroptionalChildren
nameoptionalstring
optionaloptionalboolean
readonlyoptionalboolean
refkeyoptionalRefkey | Refkey[]
typeoptionalChildren