Class APIError<ErrorCodeT>

Type Parameters

  • ErrorCodeT = unknown

Hierarchy

Constructors

Properties

_APIError: never
_JamError: never

Workaround for TypeScript duck-typing. Working with classes we often needed to prevent A to be assigned to subtype B.

  • field is non-enumerable for clean logs and usage in IDE
  • ! is for strictPropertyInitialization TypeScript flag
  • never must not have a reachable end point - never be used.
code: ErrorCodeT
message: string
name: string
stack?: string
prepareStackTrace?: ((err, stackTraces) => any)

Type declaration

stackTraceLimit: number

Methods

  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • Optional constructorOpt: Function

    Returns void

Generated using TypeDoc