Skip to content

#1 PDF Application on GitHub that lets you edit PDFs on any device anywhere

1.9 KB
Raw Blame
/// <reference types="vite-plugin-svgr/client" />
/// <reference types="gapi" />
/// <reference types="gapi.client.drive-v3" />
/// <reference types="google.accounts" />
/// <reference types="google.picker" />

declare module "*.js";
declare module "*.module.css";

declare global {
  interface Window {
    __STIRLING_PDF_BASE_URL__?: string;
    STIRLING_PDF_API_BASE_URL?: string;
    endpointAvailabilityService?: unknown;
    pdfjsLib?: typeof import("pdfjs-dist");
    /**
     * File System Access API directory picker. Not in the DOM lib; present in
     * Chromium and Firefox, absent in older Safari, so callers feature-detect.
     */
    showDirectoryPicker?: (options?: {
      id?: string;
      mode?: "read" | "readwrite";
      startIn?: FileSystemHandle | string;
    }) => Promise<FileSystemDirectoryHandle>;
  }

  /**
   * Non-standard permission methods on File System Access handles (Chromium
   * only; absent in Firefox/Safari). Optional so callers must feature-detect.
   */
  interface FileSystemHandle {
    queryPermission?: (descriptor?: {
      mode?: "read" | "readwrite";
    }) => Promise<PermissionState>;
    requestPermission?: (descriptor?: {
      mode?: "read" | "readwrite";
    }) => Promise<PermissionState>;
  }
}

declare module "axios" {
  export interface AxiosRequestConfig<_D = unknown> {
    suppressErrorToast?: boolean;
    /** Supplies pipeline details only when that request caused the credit prompt. */
    accountLinkBlockContext?: import("@editor/services/accountLinkBlock").AccountLinkBlockContext;
    skipAuthRedirect?: boolean;
    skipBackendReadyCheck?: boolean;
    /** Backend endpoint key for desktop routing, when the URL serves more than one. */
    endpointName?: string;
  }

  export interface InternalAxiosRequestConfig<_D = unknown> {
    suppressErrorToast?: boolean;
    skipAuthRedirect?: boolean;
    skipBackendReadyCheck?: boolean;
    endpointName?: string;
  }
}

export {};