Files
calorie-tracker/src/lib/ipc.ts
Fractal-Tess a177cf16c2 rename to ipc
2023-05-18 10:44:26 +03:00

29 lines
714 B
TypeScript

// 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>;
}
}
const invoke = window.__TAURI_INVOKE__;
export function helloTauri() {
return invoke<string>('hello_tauri');
}
export function hash256sum(hashInput: string) {
return invoke<string>('hash256sum', { hashInput });
}
export function storeSetKey(key: string, value: string) {
return invoke<null>('store_set_key', { key, value });
}
export function storeReadKey(key: string) {
return invoke<string | null>('store_read_key', { key });
}