From fa11d223a53a44053565e63276365c94e699bbcf Mon Sep 17 00:00:00 2001 From: isaacs Date: Wed, 1 Mar 2023 01:26:27 -0800 Subject: [PATCH] correct types issues Fix: #277 --- index.d.ts | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/index.d.ts b/index.d.ts index 83bcfa9c..b58395e0 100644 --- a/index.d.ts +++ b/index.d.ts @@ -112,7 +112,7 @@ declare class LRUCache implements Iterable<[K, V]> { * `cache.set(key, undefined)`. Use {@link has} to determine whether a key is * present in the cache at all. */ - public get(key: K, options?: LRUCache.GetOptions): V | undefined + public get(key: K, options?: LRUCache.GetOptions): V | undefined /** * Like {@link get} but doesn't update recency or delete stale items. @@ -129,7 +129,7 @@ declare class LRUCache implements Iterable<[K, V]> { * Will not update item age unless {@link updateAgeOnHas} is set in the * options or constructor. */ - public has(key: K, options?: LRUCache.HasOptions): boolean + public has(key: K, options?: LRUCache.HasOptions): boolean /** * Deletes a key out of the cache. @@ -158,7 +158,7 @@ declare class LRUCache implements Iterable<[K, V]> { key: K, cache: this ) => boolean | undefined | void, - options?: LRUCache.GetOptions + options?: LRUCache.GetOptions ): V | undefined /** @@ -656,7 +656,7 @@ declare namespace LRUCache { * options which override the options set in the LRUCAche constructor * when calling {@link has}. */ - interface HasOptions { + interface HasOptions { updateAgeOnHas?: boolean status: Status } @@ -665,7 +665,7 @@ declare namespace LRUCache { * options which override the options set in the LRUCache constructor * when calling {@link get}. */ - interface GetOptions { + interface GetOptions { allowStale?: boolean updateAgeOnGet?: boolean noDeleteOnStaleGet?: boolean @@ -812,11 +812,6 @@ declare namespace LRUCache { */ fetchResolved?: true - /** - * The results of the fetchMethod promise were stored in the cache - */ - fetchUpdated?: true - /** * The fetchMethod promise was rejected */