Skip to Content
typesAnyFunction

AnyFunction

See source on Github

Shorthand for correctly expressing any function.

Example

const execute = (func: AnyFunction) => { ... } const func1 = () => { ... } const func2 = (arg: string) => { ... } execute(func1) // OK execute(func2) // OK