Skip to content

ClassMethod

import { ClassMethod } from "@alloy-js/typescript";
<ClassMethod
async
doc={Children}
jsPrivate
name="string"
parameters={ParameterDescriptor[] | string[]}
parametersChildren={Children}
private
protected
public
refkey={Refkey}
returnType={Children}
static
typeParameters={TypeParameterDescriptor[] | string[]}
typeParametersChildren={Children}
>
{children}
</ClassMethod>

Props

asyncoptionalboolean
childrenoptionalChildren
childrenoptionalChildren
docoptionalChildren
jsPrivateoptionalboolean
namestring
parametersoptionalParameterDescriptor[] | 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 ParameterDescriptors.

parametersChildrenoptionalChildren

Raw content to be used as the parameter list.

privateoptionalboolean
protectedoptionalboolean
publicoptionalboolean
refkeyoptionalRefkey
returnTypeoptionalChildren

The return type of the function.

staticoptionalboolean
typeParametersoptionalTypeParameterDescriptor[] | 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 TypeParameterDescriptors.

typeParametersChildrenoptionalChildren

Raw content to be used as the type parameter list.