import { Injector } from '@angular/core'; import { Observable } from 'rxjs'; import type { LazyImportLoaderFn } from './inject-lazy-impl'; /** * Loads a service lazily. The service is loaded when the observable is subscribed to. * * @param loader A function that returns a promise of the service to load. * @param injector The injector to use to load the service. If not provided, the current injector is used. * @returns An observable of the service. * * @example * ```ts * const dataService$ = injectLazy(() => import('./data-service').then((m) => m.MyService)); * or * const dataService$ = injectLazy(() => import('./data-service')); * ``` */ export declare function injectLazy(loader: LazyImportLoaderFn, injector?: Injector): Observable;