2023-04-13 00:04:45 +09:00
|
|
|
declare module "*.jpg";
|
|
|
|
declare module "*.png";
|
|
|
|
declare module "*.woff2";
|
|
|
|
declare module "*.woff";
|
|
|
|
declare module "*.ttf";
|
2023-04-13 00:27:28 +09:00
|
|
|
declare module "*.scss" {
|
|
|
|
const content: Record<string, string>;
|
|
|
|
export default content;
|
2023-04-13 00:04:45 +09:00
|
|
|
}
|
2023-04-13 00:27:28 +09:00
|
|
|
|
|
|
|
declare module "*.svg";
|
2023-06-29 01:27:18 +09:00
|
|
|
|
|
|
|
declare interface Window {
|
|
|
|
__TAURI__?: {
|
|
|
|
writeText(text: string): Promise<void>;
|
2023-10-03 10:49:03 +09:00
|
|
|
invoke(command: string, payload?: Record<string, unknown>): Promise<any>;
|
|
|
|
dialog: {
|
|
|
|
save(options?: Record<string, unknown>): Promise<string | null>;
|
|
|
|
};
|
|
|
|
fs: {
|
|
|
|
writeBinaryFile(path: string, data: Uint8Array): Promise<void>;
|
2024-02-02 14:58:06 +09:00
|
|
|
writeTextFile(path: string, data: string): Promise<void>;
|
2023-10-03 10:49:03 +09:00
|
|
|
};
|
2024-09-04 22:04:13 +09:00
|
|
|
notification: {
|
2023-10-03 10:08:11 +09:00
|
|
|
requestPermission(): Promise<Permission>;
|
|
|
|
isPermissionGranted(): Promise<boolean>;
|
|
|
|
sendNotification(options: string | Options): void;
|
|
|
|
};
|
2024-10-11 12:29:22 +09:00
|
|
|
updater: {
|
|
|
|
checkUpdate(): Promise<UpdateResult>;
|
|
|
|
installUpdate(): Promise<void>;
|
|
|
|
onUpdaterEvent(
|
|
|
|
handler: (status: UpdateStatusResult) => void,
|
|
|
|
): Promise<UnlistenFn>;
|
|
|
|
};
|
2024-09-04 22:04:13 +09:00
|
|
|
http: {
|
|
|
|
fetch<T>(
|
|
|
|
url: string,
|
|
|
|
options?: Record<string, unknown>,
|
|
|
|
): Promise<Response<T>>;
|
|
|
|
};
|
2023-06-29 01:27:18 +09:00
|
|
|
};
|
|
|
|
}
|