Class Config
Less than 1 minute
Config
Class Declared in packages/sdk/config/src/config.ts:122
Global configuration object. NOTE: Config objects are immutable.
Constructors
constructor(config, objects)
Creates an immutable instance.
Returns: Config
Arguments:
config
: Config
objects
: Config[]
Properties
values
Type: Config
Returns an immutable config JSON object.
Methods
get(key, [defaultValue])
Returns the given config property.
Returns: DeepIndex<Config, ParseKey<K>>
Arguments:
key
: K
defaultValue
: DeepIndex<Config, ParseKey<K>>
getOrThrow(key)
Returns the given config property or throw if it doesn't exist.
Returns: Exclude<DeepIndex<Config, ParseKey<K>>, undefined>
Arguments:
key
: K
getUnchecked(key, [defaultValue])
Returns config key without type checking.
Returns: T
Arguments:
key
: string
defaultValue
: T