From 1d1bade4368f0e441fad64cc4fd3992e9a9ded71 Mon Sep 17 00:00:00 2001 From: HylaruCoder Date: Sat, 12 Oct 2024 22:00:48 +0800 Subject: [PATCH] fix: autoSave Inconsistency The Tauri Store plugin has a type mismatch for the autoSave option. In TypeScript, it's documented as a boolean, but the Rust backend expects a u64. Setting autoSave to true or false in createStore causes an error: ` Unhandled Promise Rejection: invalid args `autoSave` for command `create_store`: invalid type: boolean `true`, expected u64 ` --- plugins/store/guest-js/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/store/guest-js/index.ts b/plugins/store/guest-js/index.ts index 259b0662..4eaf05c1 100644 --- a/plugins/store/guest-js/index.ts +++ b/plugins/store/guest-js/index.ts @@ -19,7 +19,7 @@ export type StoreOptions = { /** * Auto save on modification with debounce duration in milliseconds */ - autoSave?: boolean + autoSave?: number } /**