Function result

  • Wraps a function to catch any exceptions inside and return a Result tuple with the value and error, if any.

    Returns

    A new function that wraps fn and returns the result tuple.

    Type Parameters

    • T = any

    • E = unknown

    Parameters

    Returns Function<Result<T, E>>

Generated using TypeDoc