Type Parameters
- T extends {
[key: string]: any;
}
Constructors
constructor
- new LocalStorage<T>(options): LocalStorage<T>
Type Parameters
- T extends {
[key: string]: any;
}
Parameters
- options: {
cwd?: string;
projectName?: string;
}Optional
cwd?: string
Optional
projectName?: string
Methods
clear
- clear(): void
Returns void
delete
- delete<TKey>(key): void
Type Parameters
- TKey extends string | number | symbol
Returns void
get
- get<TKey>(key): undefined | T[TKey]
Type Parameters
- TKey extends string | number | symbol
Returns undefined | T[TKey]
The value.
set
- set<TKey>(key, value?): 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.