Complete refactor (#123)

This commit is contained in:
Misode
2020-11-23 14:29:16 +01:00
committed by GitHub
parent 0ad33cd88f
commit 982b4728e7
45 changed files with 1162 additions and 1113 deletions

View File

@@ -0,0 +1,14 @@
import { Property } from './Property'
export class LocalStorageProperty extends Property<string> {
constructor(private id: string, fallback: string) {
super(localStorage.getItem(id) ?? fallback)
}
set(value: string) {
super.set(value)
localStorage.setItem(this.id, value)
}
get(): string {
return this.value
}
}