@kwiz/node 1.0.19 → 1.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/get-with-cache.d.ts
CHANGED
package/package.json
CHANGED
package/src/get-with-cache.ts
CHANGED
|
@@ -10,7 +10,7 @@ export async function getWithCache<T>(worker: () => Promise<{ success: boolean;
|
|
|
10
10
|
/** must be unique for your call! function name, and parameters */
|
|
11
11
|
cacheKey: string;
|
|
12
12
|
forceRefresh?: boolean;
|
|
13
|
-
}) {
|
|
13
|
+
}): Promise<T> {
|
|
14
14
|
const now = new Date();
|
|
15
15
|
//purge old values
|
|
16
16
|
Object.keys($$cache).forEach(key => {
|