Comparing version 0.12.2 to 0.13.0
@@ -516,2 +516,6 @@ 'use strict'; | ||
}; | ||
optimistic.forget = function () { | ||
var key = makeCacheKey.apply(null, arguments); | ||
return key !== void 0 && cache.delete(key); | ||
}; | ||
return optimistic; | ||
@@ -518,0 +522,0 @@ } |
@@ -513,2 +513,6 @@ import { Slot } from '@wry/context'; | ||
}; | ||
optimistic.forget = function () { | ||
var key = makeCacheKey.apply(null, arguments); | ||
return key !== void 0 && cache.delete(key); | ||
}; | ||
return optimistic; | ||
@@ -515,0 +519,0 @@ } |
@@ -9,3 +9,3 @@ export declare class Cache<K = any, V = any> { | ||
has(key: K): boolean; | ||
get(key: K): void | V; | ||
get(key: K): V | undefined; | ||
private getEntry; | ||
@@ -12,0 +12,0 @@ set(key: K, value: V): V; |
@@ -10,2 +10,3 @@ import { KeyTrie } from "./key-trie"; | ||
peek: (...args: TKeyArgs) => TResult | undefined; | ||
forget: (...args: TKeyArgs) => boolean; | ||
}; | ||
@@ -12,0 +13,0 @@ export declare type OptimisticWrapOptions<TArgs extends any[], TKeyArgs extends any[] = TArgs> = { |
{ | ||
"name": "optimism", | ||
"version": "0.12.2", | ||
"version": "0.13.0", | ||
"author": "Ben Newman <ben@benjamn.com>", | ||
@@ -38,3 +38,3 @@ "description": "Composable reactive caching with efficient invalidation.", | ||
"@types/mocha": "^8.0.3", | ||
"@types/node": "^13.13.5", | ||
"@types/node": "^14.11.2", | ||
"fibers": "^5.0.0", | ||
@@ -41,0 +41,0 @@ "mocha": "^8.1.3", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
116646
1155