download_manager.d.ts 858 B

1234567891011121314151617181920
  1. export type IDownloadManager = import("./interfaces").IDownloadManager;
  2. /**
  3. * @implements {IDownloadManager}
  4. */
  5. export class DownloadManager implements IDownloadManager {
  6. _openBlobUrls: WeakMap<object, any>;
  7. downloadUrl(url: any, filename: any): void;
  8. downloadData(data: any, filename: any, contentType: any): void;
  9. /**
  10. * @returns {boolean} Indicating if the data was opened.
  11. */
  12. openOrDownloadData(element: any, data: any, filename: any): boolean;
  13. /**
  14. * @param sourceEventType {string} Used to signal what triggered the download.
  15. * The version of PDF.js integrated with Firefox uses this to to determine
  16. * which dialog to show. "save" triggers "save as" and "download" triggers
  17. * the "open with" dialog.
  18. */
  19. download(blob: any, url: any, filename: any, sourceEventType?: string): void;
  20. }