• Parameters

    • error: unknown

    Returns asserts error is Error

    Deprecated

    use ensureError instead. e.g.

    } catch (e) {
    const error = ensureError(e);
    // your error handling logic
    }

    Type assertion function that throws a Unhandled MosaicError if provided parameter is not an instance of an Error, and asserts value to an Error type if no error is thrown.

Generated using TypeDoc