This commit is contained in:
Fractal-Tess
2024-01-24 04:35:13 +02:00
parent ebec1ab8ea
commit f2186a5971
2 changed files with 36 additions and 37 deletions

View File

@@ -1,28 +1,27 @@
/* eslint-disable */
// 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>;
__TAURI_INVOKE__<T>(cmd: string, args?: Record<string, unknown>): Promise<T>
}
}
const invoke = window.__TAURI_INVOKE__;
// Function avoids 'window not defined' in SSR
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 })
}