Class responsible of file management, both configuration file as validator files

Type Parameters

  • SystemConfig extends Record<string, any> = Record<string, any>

Constructors

Properties

config: SystemConfig

Final configuration

defaultConfig: Partial<SystemConfig> = {}

Default configuration

envConfig: Partial<SystemConfig> = {}

Environment configuration

nonDisclosureConfig: Partial<SystemConfig>

Final configuration without environment variables

presets: Record<string, Partial<SystemConfig>> = {}

Presets configuration map

Accessors

  • get error(): undefined | Multi
  • Validation error, if exist

    Returns undefined | Multi

  • get isErrored(): boolean
  • Flag to indicate that the final configuration has some errors

    Returns boolean

  • get preset(): undefined | string
  • Return the preset used to create the final configuration

    Returns undefined | string

  • get schema(): undefined | string
  • Return the schema used to validate the final configuration

    Returns undefined | string

Methods

  • Gets the value at path of object. If the resolved value is undefined, the defaultValue is returned in its place.

    Type Parameters

    • T

      Type of the property to return

    Parameters

    • path: string | string[]

      path to the property to get

    • OptionaldefaultValue: any

      default value to return if the property is not found

    Returns undefined | T

  • Gets the value at path of object. If the resolved value is undefined, the defaultValue is returned in its place.

    Type Parameters

    • P extends string | number | symbol

    Parameters

    • key: P

      path to the property to get

    • OptionaldefaultValue: any

      default value to return if the property is not found

    Returns undefined | SystemConfig[P]