|
|
@ -60,9 +60,9 @@ await store.set("some-key", { value: 5 });
|
|
|
|
const val = await store.get<{ value: number }>("some-key");
|
|
|
|
const val = await store.get<{ value: number }>("some-key");
|
|
|
|
|
|
|
|
|
|
|
|
if (val) {
|
|
|
|
if (val) {
|
|
|
|
console.log(val);
|
|
|
|
console.log(val);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
console.log("val is null");
|
|
|
|
console.log("val is null");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
await store.save(); // this manually saves the store, otherwise the store is only saved when your app is closed
|
|
|
|
await store.save(); // this manually saves the store, otherwise the store is only saved when your app is closed
|
|
|
|