tauri-plugin-store: typescript mismatch for attribute autoSave
The autoSave has the wrong type in the typescript definitions.
export type StoreOptions = {
/**
* Auto save on modification with debounce duration in milliseconds
*/
autoSave?: boolean;
};
autoSave should be of type number, not boolean.
So I believe the typescript definition is correct, but the rust one isn't, since a boolean makes sense here, but the command is actually the one complaining:
invalid args `autoSave` for command `create_store`: invalid type: boolean `true`, expected u64
After looking inside @Legend-Master's PR, it seems autoSave can actually be both, and yeah the rust definition needs soem update https://github.com/tauri-apps/plugins-workspace/pull/1860/files#diff-3724bbe06d5e960aae4085c2cc32c2ec0ea4315d8f3c0408ab415b79cce45105R61
Thanks @Legend-Master, will sit tight for this one
The intention was to use number | undefined here since auto save was off by default, but this commit made a mistake so...
Anyways, in the new refactor #1860 I'm currently thinking we enable auto save by default and the option will be false to disable auto save, true | undefined for the default auto save duration, number for a custom auto save duration