Invokes the provided function immediately and returns its result.
The return type of the function.
The function to execute.
The function's return value.
const value = invoke(() => 42); // 42 Copy
const value = invoke(() => 42); // 42
Invokes the provided function immediately and returns its result.