Skip to content

Latest commit

 

History

History
91 lines (65 loc) · 1 KB

File metadata and controls

91 lines (65 loc) · 1 KB

typelab / aliases / Function

type Function<Params, Return> = (...param) => Return;

Type that represents a function that takes specified parameters types and returns a specified type.

Type Parameters

Type Parameter Default type Description

Params extends ReadonlyArray

Any[]

The parameters types of the function as an array, defaults to any[].

Return

Any

The return type of the function, defaults to any.

Parameters

Parameter Type

...param

Params

Returns

Return

Example

// MyFunction is (param_0: number, param_1: string) => string
type MyFunction = Function<[number, string], string>;