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
childrenoptional Children
childrenoptional Children
docoptional Children
jsPrivateoptional boolean
namestring | Namekey
nullishoptional boolean
parametersoptional 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 ParameterDescriptors.
parametersChildrenoptional ChildrenRaw content to be used as the parameter list.
privateoptional boolean
protectedoptional boolean
publicoptional boolean
refkeyoptional Refkey
returnTypeoptional ChildrenThe return type of the function.
staticoptional boolean
typeParametersoptional 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 TypeParameterDescriptors.
typeParametersChildrenoptional ChildrenRaw content to be used as the type parameter list.