Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "_shared/capped-structure"

Index

Interfaces

Functions

Functions

guardOverflow

  • guardOverflow(throwError: boolean, returnValue?: any): (Anonymous function)
  • Method decorator that prevents a structure from overflowing. The structure must implement CappedStructure interface. In case of overflow, it throws an error if throwError parameter is set to true, or returns the specified returnValue otherwise.

    Parameters

    • throwError: boolean

      Whether it should throw an error or not in case of overflow

    • Optional returnValue: any

      The value to be returned in case of overflow, if throwError is set to false (it is ignored otherwise)

    Returns (Anonymous function)

Generated using TypeDoc