Updated documentation
All checks were successful
Build / Build NPM Project (push) Successful in 43s
Build / Tag Version (push) Successful in 6s
Build / Publish (push) Successful in 7s

This commit is contained in:
2023-12-27 17:39:59 -05:00
parent 9757b7aaca
commit 09bbfc0b75
4 changed files with 30 additions and 77 deletions

View File

@ -68,6 +68,11 @@ export class Persist<T> {
this.load();
}
/** Notify listeners of change */
private notify(value: T) {
Object.values(this.watches).forEach(watch => watch(value));
}
/** Delete value from storage */
clear() {
this.storage.removeItem(this.key);
@ -101,11 +106,6 @@ export class Persist<T> {
/** Return current value */
valueOf() { return this.value; }
/** Notify listeners of change */
private notify(value: T) {
Object.values(this.watches).forEach(watch => watch(value));
}
}
/**