common-stuff
    Preparing search index...

    Function assertNotError

    • Checks if given value is Error if it's subclass and then throw it.

      Type Parameters

      • T

      Parameters

      • value: Error | T

        any value

      Returns T

      value if it is not an instance of Error

      const value = new Error()
      const value2 = assertNotError(value)
      // throws error

      value if it is an instance of Error