From fb05433247215ffa75d90b2ed5a4ac44cc4c127e Mon Sep 17 00:00:00 2001 From: Adriaan Knapen Date: Fri, 30 Dec 2022 18:27:35 +0200 Subject: [PATCH] fix(localstored): mark "engine"-option as optional The documentation and code mark the "engine"-prop as optional. However, the TypeScript type enforces it to be required, therefore any consumer who tries to omit this prop and use the default build-in engine gets a TypeScript error. This change updates the argument-type of localstored, such that the "engine"-option becomes optional. Which allows a consumer to use the default build-in LocalStorage-based engine. --- plugins/localstored/src/localstorage.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/localstored/src/localstorage.ts b/plugins/localstored/src/localstorage.ts index 7006c893..5c6eff62 100644 --- a/plugins/localstored/src/localstorage.ts +++ b/plugins/localstored/src/localstorage.ts @@ -10,7 +10,7 @@ export interface LocalStored { } export function localstored(options?: { key?: string, - engine: StoreEngine, + engine?: StoreEngine, initializer: () => Promise }): ExtensionFactory { return () => {