From 9a339c177aca4d1628d88fad1a759e60fe901927 Mon Sep 17 00:00:00 2001 From: Tim Kennedy Date: Wed, 6 Apr 2022 11:13:25 +1000 Subject: [PATCH] Fix: make all options optional in typings --- index.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.d.ts b/index.d.ts index b03a648..e87793b 100644 --- a/index.d.ts +++ b/index.d.ts @@ -2,8 +2,8 @@ declare module "lru-native2" { interface LRUCacheOptions { maxElements?: number maxAge?: number - size: number - maxLoadFactor: number + size?: number + maxLoadFactor?: number } interface LRUCacheStats { @@ -17,7 +17,7 @@ declare module "lru-native2" { type K = string class LRUCache { - constructor(options: LRUCacheOptions) + constructor(options?: LRUCacheOptions) public set(key: K, value: V): void public get(key: K): V | undefined