# 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

* jsx

  ```tsx
  import { InterfaceMember } from "@alloy-js/typescript";


  <InterfaceMember
    doc={Children}
    name={string | Namekey}
    nullish
    optional
    readonly
    refkey={Refkey | Refkey[]}
    type={Children}
   />
  ```

* stc

  ```ts
  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)
  ```

### Props

|          |                                                                                           |   |
| -------- | ----------------------------------------------------------------------------------------- | - |
| children | optional[Children](../../../core/types/children/)                                         |   |
| doc      | optional[Children](../../../core/types/children/)                                         |   |
| name     | string \| [Namekey](../../../core/types/namekey/)                                         |   |
| nullish  | optional boolean                                                                          |   |
| optional | optional boolean                                                                          |   |
| readonly | optional boolean                                                                          |   |
| refkey   | optional[Refkey](../../../core/types/refkey/) \| [Refkey](../../../core/types/refkey/)\[] |   |
| type     | optional[Children](../../../core/types/children/)                                         |   |

## Overload 2

* jsx

  ```tsx
  import { InterfaceMember } from "@alloy-js/typescript";


  <InterfaceMember
    doc={Children}
    indexer={Children}
    readonly
    refkey={Refkey | Refkey[]}
    type={Children}
   />
  ```

* stc

  ```ts
  import { InterfaceMember } from "@alloy-js/typescript/stc";


  InterfaceMember({
    doc: Children,
    indexer: Children,
    readonly: boolean,
    refkey: Refkey | Refkey[],
    type: Children,
  }).children(children)
  ```

### Props

|          |                                                                                           |   |
| -------- | ----------------------------------------------------------------------------------------- | - |
| children | optional[Children](../../../core/types/children/)                                         |   |
| doc      | optional[Children](../../../core/types/children/)                                         |   |
| indexer  | [Children](../../../core/types/children/)                                                 |   |
| readonly | optional boolean                                                                          |   |
| refkey   | optional[Refkey](../../../core/types/refkey/) \| [Refkey](../../../core/types/refkey/)\[] |   |
| type     | optional[Children](../../../core/types/children/)                                         |   |
