Abstract
Returns an array of ConfigEntry for each element in the config.
Invokes actionFn
once for each key-value pair present in the config object.
The function (key: string, value: ConfigValue) => void
to be called for each element.
Returns the value associated to the key, or undefined if there is none.
The key (object property)
Optional
decrypt: booleanIf it is an encrypted key, decrypt the value. If the value is an object, a clone will be returned.
Optional
decrypt: booleanReturns the entire config contents.
NOTE: Data will still be encrypted unless decrypt is passed in. A clone of the data will be returned to prevent storing un-encrypted data in memory and potentially saving to the file system.
Sets the value for the key in the config object. This will override the existing value. To do a partial update, use BaseConfigStore.update.
Convert an object to a ConfigContents and set it as the config contents.
The object.
Convert the config object to a JSON object. Returns the config contents. Same as calling ConfigStore.getContents
Returns true
if an element in the config object existed and has been removed, or false
if the element does not
exist. BaseConfigStore.has will return false afterwards.
The key
Updates the value for the key in the config object. If the value is an object, it will be merged with the existing object.
An abstract class that implements all the config management functions but none of the storage functions.
Note: To see the interface, look in typescripts autocomplete help or the npm package's ConfigStore.d.ts file.