Class GlobalConfig<T>

Type Parameters

Hierarchy

  • GlobalConfig

Constructors

Properties

Methods

Constructors

Properties

configuration: Configuration & Record<PropertyKey, any> = {}

The configuration object.

usedAsReference: (string | number | symbol)[] = ...

Keys marked for not be deeply cloned when setting and returning values.

Methods

  • Get a value from the config.

    Type Parameters

    • K extends string | number | symbol

    Parameters

    • key: K
    • Optional defaultVal: T[K]

    Returns T[K]

  • Type Parameters

    • D

    Parameters

    • key: PropertyKey
    • Optional defaultVal: D

    Returns D

  • Set a config value.

    Type Parameters

    • K extends string | number | symbol

    Parameters

    • key: K
    • value: T[K]

    Returns asserts this is GlobalConfig<WithProperty<T, K>>

  • Type Parameters

    • K extends PropertyKey

    • V

    Parameters

    • key: K
    • value: V

    Returns asserts this is GlobalConfig<T & {
        [key in PropertyKey]: V
    }>

Generated using TypeDoc