Updates and more

This commit is contained in:
2023-11-03 20:31:27 +01:00
parent b5a54d087b
commit e97e86f9ac
22 changed files with 363 additions and 80 deletions

View File

@@ -33,7 +33,7 @@ export function cachedFamily<T, K>(normal: K, init: (arg0: T) => Promise<K>): (a
const stores: Map<T, Cached<K>> = new Map();
return (arg: T) => {
if(stores.has(arg)) {
return stores.get(arg);
return stores.get(arg)!!;
} else {
const store = writable<K>(normal);
let first = true;