Type Parameters
- T extends { [key: string]: any }
Constructors
constructor
new LocalStorage<T extends { [key: string]: any }>( options: { cwd?: string; projectName?: string },): LocalStorage<T> Type Parameters
- T extends { [key: string]: any }
Parameters
- options: { cwd?: string; projectName?: string }
Methods
delete
delete<TKey extends string | number | symbol>(key: TKey): void Type Parameters
- TKey extends string | number | symbol
Returns void
get
get<TKey extends string | number | symbol>(key: TKey): undefined | T[TKey] Type Parameters
- TKey extends string | number | symbol
Returns undefined | T[TKey]
The value.
set
set<TKey extends string | number | symbol>(key: TKey, value?: T[TKey]): void Type Parameters
- TKey extends string | number | symbol
Returns void
A wrapper around the
conf
package that provides a strongly-typed interface for accessing the local storage.