Skip to content

ClassMethod

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>
asyncoptional boolean
childrenoptionalChildren
childrenoptionalChildren
docoptionalChildren
jsPrivateoptional boolean
namestring | Namekey
nullishoptional boolean
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.
parametersChildrenoptionalChildrenRaw content to be used as the parameter list.
privateoptional boolean
protectedoptional boolean
publicoptional boolean
refkeyoptionalRefkey
returnTypeoptionalChildrenThe return type of the function.
staticoptional boolean
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.
typeParametersChildrenoptionalChildrenRaw content to be used as the type parameter list.