import { InjectionToken, Injector, Type } from '@angular/core';
/**
 * Safely resolves a service from the injector only when needed.
 * Avoids instantiation errors that can occur with `inject(..., { optional: true })`.
 *
 * @param token The service token to inject
 * @param injector The injector to use (defaults to the current injector)
 * @returns The service instance or null if unavailable
 */
export declare function injectOptional<T>(token: Type<T> | InjectionToken<T>, injector?: Injector): T | null;
//# sourceMappingURL=injector.d.ts.map