# ClassMethod

* jsx

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


  <ClassMethod
    async
    doc={Children}
    jsPrivate
    name={string | Namekey}
    nullish
    parameters={ParameterDescriptor[] | string[]}
    parametersChildren={Children}
    private
    protected
    public
    refkey={Refkey}
    returnType={Children}
    static
    typeParameters={TypeParameterDescriptor[] | string[]}
    typeParametersChildren={Children}
  >
    {children}
  </ClassMethod>
  ```

* stc

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


  ClassMethod({
    async: boolean,
    doc: Children,
    jsPrivate: boolean,
    name: string | Namekey,
    nullish: boolean,
    parameters: ParameterDescriptor[] | string[],
    parametersChildren: Children,
    private: boolean,
    protected: boolean,
    public: boolean,
    refkey: Refkey,
    returnType: Children,
    static: boolean,
    typeParameters: TypeParameterDescriptor[] | string[],
    typeParametersChildren: Children,
  }).children(children)
  ```

## Props

|                        |                                                                                         |                                                                                                                                                                                                                                       |
| ---------------------- | --------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| async                  | optional boolean                                                                        |                                                                                                                                                                                                                                       |
| children               | optional[Children](../../../core/types/children/)                                       |                                                                                                                                                                                                                                       |
| children               | optional[Children](../../../core/types/children/)                                       |                                                                                                                                                                                                                                       |
| doc                    | optional[Children](../../../core/types/children/)                                       |                                                                                                                                                                                                                                       |
| jsPrivate              | optional boolean                                                                        |                                                                                                                                                                                                                                       |
| name                   | string \| [Namekey](../../../core/types/namekey/)                                       |                                                                                                                                                                                                                                       |
| nullish                | optional boolean                                                                        |                                                                                                                                                                                                                                       |
| parameters             | optional[ParameterDescriptor](../../types/parameterdescriptor/)\[] \| string\[]         | The parameters to the function. Can be an array of strings for parameters which don’t have a type or a default value. Otherwise, it’s an array of [ParameterDescriptor](../../types/parameterdescriptor/)s.                           |
| parametersChildren     | optional[Children](../../../core/types/children/)                                       | Raw content to be used as the parameter list.                                                                                                                                                                                         |
| private                | optional boolean                                                                        |                                                                                                                                                                                                                                       |
| protected              | optional boolean                                                                        |                                                                                                                                                                                                                                       |
| public                 | optional boolean                                                                        |                                                                                                                                                                                                                                       |
| refkey                 | optional[Refkey](../../../core/types/refkey/)                                           |                                                                                                                                                                                                                                       |
| returnType             | optional[Children](../../../core/types/children/)                                       | The return type of the function.                                                                                                                                                                                                      |
| static                 | optional boolean                                                                        |                                                                                                                                                                                                                                       |
| typeParameters         | optional[TypeParameterDescriptor](../../types/typeparameterdescriptor/)\[] \| string\[] | The type parameters for the function. Can be an array of strings for type parameters which don’t have any constraints or a default type, otherwise it’s an array of [TypeParameterDescriptor](../../types/typeparameterdescriptor/)s. |
| typeParametersChildren | optional[Children](../../../core/types/children/)                                       | Raw content to be used as the type parameter list.                                                                                                                                                                                    |
