Function simple_try

  • Tries to run a function and returns an object containing either a value if the function completed or an error if the function threw.

    Parameters

    • func: any

    Returns {
        error?: undefined;
        value: any;
    } | {
        error: any;
        value?: undefined;
    }

Generated using TypeDoc