Config
Defined in: src/config/Config.ts:28
Immutable configuration tree loaded from HOCON files and/or code
overrides. All accessors throw ConfigError on missing or
incorrectly-typed paths; hasPath lets callers probe beforehand.
Primary entry points:
Config.load()— merge reference.conf + application.conf + env.Config.parseString(s)— parse an inline HOCON snippet.Config.parseFile(path)— parse a file.Config.fromObject(obj)— build from a plain JS object (code overrides).
Methods
Section titled “Methods”atPath()
Section titled “atPath()”atPath(
path):Config
Defined in: src/config/Config.ts:182
Wrap the tree under the given path: {a:{b:1}}.atPath(“x.y”) → {x:{y:{a:{b:1}}}}.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Config
getBoolean()
Section titled “getBoolean()”getBoolean(
path):boolean
Defined in: src/config/Config.ts:113
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”boolean
getBytes()
Section titled “getBytes()”getBytes(
path):number
Defined in: src/config/Config.ts:133
Byte count.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”number
getConfig()
Section titled “getConfig()”getConfig(
path):Config
Defined in: src/config/Config.ts:162
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Config
getDuration()
Section titled “getDuration()”getDuration(
path):number
Defined in: src/config/Config.ts:125
Duration in milliseconds.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”number
getInt()
Section titled “getInt()”getInt(
path):number
Defined in: src/config/Config.ts:100
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”number
getList()
Section titled “getList()”getList(
path):ConfigValue[]
Defined in: src/config/Config.ts:150
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”getNumber()
Section titled “getNumber()”getNumber(
path):number
Defined in: src/config/Config.ts:106
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”number
getObject()
Section titled “getObject()”getObject(
path):ConfigObject
Defined in: src/config/Config.ts:156
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”getString()
Section titled “getString()”getString(
path):string
Defined in: src/config/Config.ts:93
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”string
getStringList()
Section titled “getStringList()”getStringList(
path):string[]
Defined in: src/config/Config.ts:140
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”string[]
hasPath()
Section titled “hasPath()”hasPath(
path):boolean
Defined in: src/config/Config.ts:89
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”boolean
merge()
Section titled “merge()”merge(
overlay):Config
Defined in: src/config/Config.ts:177
Inverse of withFallback — layer overlay on top.
Parameters
Section titled “Parameters”overlay
Section titled “overlay”Config
Returns
Section titled “Returns”Config
toJSON()
Section titled “toJSON()”toJSON():
ConfigObject
Defined in: src/config/Config.ts:193
Deep-clone the underlying tree as a plain object.
Returns
Section titled “Returns”withFallback()
Section titled “withFallback()”withFallback(
other):Config
Defined in: src/config/Config.ts:172
Merge other underneath this config — i.e. values defined here win,
keys that only exist in other are filled in.
Parameters
Section titled “Parameters”Config
Returns
Section titled “Returns”Config
empty()
Section titled “empty()”
staticempty():Config
Defined in: src/config/Config.ts:33
Returns
Section titled “Returns”Config
fromObject()
Section titled “fromObject()”
staticfromObject(obj):Config
Defined in: src/config/Config.ts:45
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”Config
load()
Section titled “load()”
staticload(options?):Config
Defined in: src/config/Config.ts:64
Load the standard config chain. Precedence (highest first):
overridespassed in code.application.confresolved viaappConfPath→process.env.ACTOR_TS_CONFIG→./application.confin CWD.reference.confbundled with this package.
Environment variables are consulted during substitution resolution (inside each parse step), not as a separate layer.
Parameters
Section titled “Parameters”options?
Section titled “options?”LoadOptions = {}
Returns
Section titled “Returns”Config
loadReference()
Section titled “loadReference()”
staticloadReference():Config
Defined in: src/config/Config.ts:81
Returns
Section titled “Returns”Config
parseFile()
Section titled “parseFile()”
staticparseFile(path):Config
Defined in: src/config/Config.ts:40
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Config
parseString()
Section titled “parseString()”
staticparseString(source):Config
Defined in: src/config/Config.ts:35
Parameters
Section titled “Parameters”source
Section titled “source”string
Returns
Section titled “Returns”Config