Function simpleTryAwait

  • Tries to await a promise and resolves with an object containing either a value if the promise resolved or an error if the promise rejected.

    Parameters

    • promise: any

    Returns Promise<{
        error?: undefined;
        value: any;
    } | {
        error: any;
        value?: undefined;
    }>

Generated using TypeDoc