using tauri http api run plugin to fixed cors in App

This commit is contained in:
lloydzhou
2024-09-04 21:04:13 +08:00
parent 04e1ab63bb
commit f9a047aad4
9 changed files with 75 additions and 20 deletions

8
app/global.d.ts vendored
View File

@@ -21,10 +21,16 @@ declare interface Window {
writeBinaryFile(path: string, data: Uint8Array): Promise<void>;
writeTextFile(path: string, data: string): Promise<void>;
};
notification:{
notification: {
requestPermission(): Promise<Permission>;
isPermissionGranted(): Promise<boolean>;
sendNotification(options: string | Options): void;
};
http: {
fetch<T>(
url: string,
options?: Record<string, unknown>,
): Promise<Response<T>>;
};
};
}