Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ConfigChecker

Class providing one time runtime check of config values. Supports non-required values too.

param

Object that should contain specified values

param

Array of values to be present on baseObject

param

Logging function

param

Function that should be run before check

param

When this is true, error is thrown after first requried value is not found

Hierarchy

  • ConfigChecker

Index

Constructors

constructor

  • new ConfigChecker(baseObject: any, values: ConfigValue[], logger: Logger, initializeFunction?: undefined | (() => void), throwIfNotFound?: boolean): ConfigChecker
  • Parameters

    • baseObject: any
    • values: ConfigValue[]
    • logger: Logger
    • Optional initializeFunction: undefined | (() => void)
    • Default value throwIfNotFound: boolean = true

    Returns ConfigChecker

Properties

_baseObject

_baseObject: any

Optional _initializeFunction

_initializeFunction: undefined | (() => void)

_logger

_logger: Logger

_throwIfNotFound

_throwIfNotFound: boolean

_values

_values: ConfigValue[]

Methods

check

  • check(): boolean
  • Checks baseObject for values

    Returns boolean

    boolean whether check was successfull

Private initialize

  • initialize(): void
  • Runs initializaton function shen one is present

    Returns void

Private missingValue

  • Reports missing value.

    Parameters

    Returns void

Generated using TypeDoc