chore: update to tauri alpha.16, api alpha.9 (#673)

Co-authored-by: Amr Bashir <amr.bashir2015@gmail.com>
This commit is contained in:
Lucas Fernandes Nogueira
2023-10-20 13:50:18 -03:00
committed by GitHub
co-authored by Amr Bashir
parent b7c5407cac
commit 5c137365c6
132 changed files with 1569 additions and 1692 deletions
+3 -7
View File
@@ -7,11 +7,7 @@
* @module
*/
declare global {
interface Window {
__TAURI_INVOKE__: <T>(cmd: string, args?: unknown) => Promise<T>;
}
}
import { invoke } from "@tauri-apps/api/primitives";
/**
* Exits immediately with the given `exitCode`.
@@ -27,7 +23,7 @@ declare global {
* @since 2.0.0
*/
async function exit(code = 0): Promise<void> {
return window.__TAURI_INVOKE__("plugin:process|exit", { code });
return invoke("plugin:process|exit", { code });
}
/**
@@ -43,7 +39,7 @@ async function exit(code = 0): Promise<void> {
* @since 2.0.0
*/
async function relaunch(): Promise<void> {
return window.__TAURI_INVOKE__("plugin:process|restart");
return invoke("plugin:process|restart");
}
export { exit, relaunch };