global.d.ts 773 B

1234567891011121314151617181920212223242526272829
  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. };
  21. notification:{
  22. requestPermission(): Promise<Permission>;
  23. isPermissionGranted(): Promise<boolean>;
  24. sendNotification(options: string | Options): void;
  25. };
  26. };
  27. }