global.d.ts 837 B

123456789101112131415161718192021222324252627282930
  1. declare module "*.jpg";
  2. declare module "*.png";
  3. declare module "*.woff2";
  4. declare module "*.woff";
  5. declare module "*.ttf";
  6. declare module "*.scss" {
  7. const content: Record<string, string>;
  8. export default content;
  9. }
  10. declare module "*.svg";
  11. declare interface Window {
  12. __TAURI__?: {
  13. writeText(text: string): Promise<void>;
  14. invoke(command: string, payload?: Record<string, unknown>): Promise<any>;
  15. dialog: {
  16. save(options?: Record<string, unknown>): Promise<string | null>;
  17. };
  18. fs: {
  19. writeBinaryFile(path: string, data: Uint8Array): Promise<void>;
  20. writeTextFile(path: string, data: string): Promise<void>;
  21. };
  22. notification:{
  23. requestPermission(): Promise<Permission>;
  24. isPermissionGranted(): Promise<boolean>;
  25. sendNotification(options: string | Options): void;
  26. };
  27. };
  28. }