singleton.d.ts 912 B

12345678910111213141516171819202122
  1. import { NzSafeAny } from 'ng-zorro-antd/core/types';
  2. import * as i0 from "@angular/core";
  3. /**
  4. * Some singletons should have life cycle that is same to Angular's. This service make sure that
  5. * those singletons get destroyed in HMR.
  6. */
  7. export declare class NzSingletonService {
  8. private get singletonRegistry();
  9. /**
  10. * This registry is used to register singleton in dev mode.
  11. * So that singletons get destroyed when hot module reload happens.
  12. *
  13. * This works in prod mode too but with no specific effect.
  14. */
  15. private _singletonRegistry;
  16. registerSingletonWithKey(key: string, target: NzSafeAny): void;
  17. unregisterSingletonWithKey(key: string): void;
  18. getSingletonWithKey<T>(key: string): T | null;
  19. private withNewTarget;
  20. static ɵfac: i0.ɵɵFactoryDeclaration<NzSingletonService, never>;
  21. static ɵprov: i0.ɵɵInjectableDeclaration<NzSingletonService>;
  22. }