This commit is contained in:
2024-06-11 20:46:38 +02:00
parent a7b14c5c40
commit 315fbdcc4e
6 changed files with 3133 additions and 1408 deletions

View File

@@ -2,26 +2,28 @@
// This file was generated by [tauri-specta](https://github.com/oscartbeaumont/tauri-specta). Do not edit this file manually.
declare global {
interface Window {
__TAURI_INVOKE__<T>(cmd: string, args?: Record<string, unknown>): Promise<T>
}
interface Window {
__TAURI_INVOKE__<T>(cmd: string, args?: Record<string, unknown>): Promise<T>;
}
}
// Function avoids 'window not defined' in SSR
const invoke = () => window.__TAURI_INVOKE__
const invoke = () => window.__TAURI_INVOKE__;
export function helloTauri() {
return invoke()<string>('hello_tauri')
return invoke()<string>("hello_tauri")
}
export function hash256sum(hashInput: string) {
return invoke()<string>('hash256sum', { hashInput })
return invoke()<string>("hash256sum", { hashInput })
}
export function storeSetKey(key: string, value: string) {
return invoke()<null>('store_set_key', { key, value })
return invoke()<null>("store_set_key", { key,value })
}
export function storeReadKey(key: string) {
return invoke()<string | null>('store_read_key', { key })
return invoke()<string | null>("store_read_key", { key })
}