image-preload.d.ts 823 B

123456789101112131415161718192021222324
  1. /**
  2. * Use of this source code is governed by an MIT-style license that can be
  3. * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
  4. */
  5. import { Platform } from '@angular/cdk/platform';
  6. import * as i0 from "@angular/core";
  7. interface PreloadOption {
  8. src: string;
  9. srcset?: string;
  10. }
  11. export type PreloadDisposeHandle = () => void;
  12. export declare class ImagePreloadService {
  13. private platform;
  14. private counter;
  15. private linkRefs;
  16. private document;
  17. constructor(platform: Platform);
  18. addPreload(option: PreloadOption): PreloadDisposeHandle;
  19. private appendPreloadLink;
  20. private removePreloadLink;
  21. static ɵfac: i0.ɵɵFactoryDeclaration<ImagePreloadService, never>;
  22. static ɵprov: i0.ɵɵInjectableDeclaration<ImagePreloadService>;
  23. }
  24. export {};