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.
Overload 1
Section titled “Overload 1”import { InterfaceMember } from "@alloy-js/typescript";
<InterfaceMember doc={Children} name={string | Namekey} nullish optional readonly refkey={Refkey | Refkey[]} type={Children} />import { InterfaceMember } from "@alloy-js/typescript/stc";
InterfaceMember({ doc: Children, name: string | Namekey, nullish: boolean, optional: boolean, readonly: boolean, refkey: Refkey | Refkey[], type: Children,}).children(children)| children | optionalChildren |
| doc | optionalChildren |
| name | string | Namekey |
| nullish | optionalboolean |
| optional | optionalboolean |
| readonly | optionalboolean |
| refkey | optionalRefkey | Refkey[] |
| type | optionalChildren |
Overload 2
Section titled “Overload 2”import { InterfaceMember } from "@alloy-js/typescript";
<InterfaceMember doc={Children} indexer={Children} readonly refkey={Refkey | Refkey[]} type={Children} />import { InterfaceMember } from "@alloy-js/typescript/stc";
InterfaceMember({ doc: Children, indexer: Children, readonly: boolean, refkey: Refkey | Refkey[], type: Children,}).children(children)| children | optionalChildren |
| doc | optionalChildren |
| indexer | Children |
| readonly | optionalboolean |
| refkey | optionalRefkey | Refkey[] |
| type | optionalChildren |