Skip to main content

Class Config

Less than 1 minute

Class Config

Declared in sdk/config/src/config.ts:122open in new window

Global configuration object. NOTE: Config objects are immutable.

Constructors

constructor(config, objects)open in new window

Creates an immutable instance.

Returns: Config

Arguments:

config: Config

objects: Config[]

Properties

valuesopen in new window

Type: Config

Returns an immutable config JSON object.

Methods

find(path, test)open in new window

Get unique key.

Returns: undefined | T

Arguments:

path: string

test: object

get(key, [defaultValue])open in new window

Returns the given config property.

Returns: DeepIndex<Config, ParseKey<K>>

Arguments:

key: K

defaultValue: DeepIndex<Config, ParseKey<K>>

getOrThrow(key)open in new window

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])open in new window

Returns config key without type checking.

Returns: T

Arguments:

key: string

defaultValue: T