Function throwExpressionLazy

  • Allows you to use kotlin-like ?: throw or sth like that.

    Can be used like const a = obj.x ?? throwExpression(() => new Error("no x"))

    Parameters

    • e: (() => any)
        • (): any
        • Returns any

    Returns never

Generated using TypeDoc