Skip to content

Function<TResult, TParams...>


This is strictly terminology. There is not an actual class or object representing this data type, and it is instead used for organizational purposes.

Function represents a function (as the name implies), however it is organized using type parameters. The format of a function is that the first type in the list is the type that it returns, and all following types are the types of the parameters it takes in.


Function<boolean, number, number> can be interpreted as...

function MyFunction(a, b)
    -- a and b are numbers
    -- ... some code here
    return true -- or return false

Function<number> can be interpreted as...

function MyFunction()
    -- ... some code here
    return 0 --or any number