Skip to content

FunctionType

A TypeScript function declaration.

FunctionType: ((props: FunctionTypeProps) => Children) & { TypeParameters: import(“@alloy-js/core”).Component<import(”./FunctionBase.jsx”).TypeParametersProps> & Required<Pick<import(“@alloy-js/core”).Component<import(”./FunctionBase.jsx”).TypeParametersProps>, “tag”>>; Parameters: import(“@alloy-js/core”).Component<import(”./FunctionBase.jsx”).FunctionTypeParametersProps> & Required<Pick<import(“@alloy-js/core”).Component<import(”./FunctionBase.jsx”).FunctionTypeParametersProps>, “tag”>>; }## Remarks

Providing parameters and type parameters can be accomplished in one of three ways:

  1. As an array of TypeParameterDescriptors or TypeParameterDescriptors.
  2. As raw content via the parametersChildren or typeParametersChildren props.
  3. As a child of this component via the [unresolved link] or [unresolved link] components.

Example

(foo: string, bar: number) => void