Home > @i2analyze/i2connect > settings > getObject
settings.getObject() function
Gets an object from a setting, or throws an Error
if the setting is missing or not an object.
Signature:
function getObject<TValue = unknown>(path: string, isRequired: true): TValue;
Introduced: API version 2.0
Type Parameters
Parameter | Type | Description |
---|---|---|
TValue | any(default: unknown) | The type of the object to retrieve. |
Parameters
Parameter | Type | Description |
---|---|---|
path | string | The path to the location of the setting within the config/settings.json file. |
isRequired | true | true to throw an exception rather than return undefined if config does not specify a valid object. |
Returns:
TValue
The object.