import { ProviderRef } from './provider-refs/provider-ref'; import { Provider, ProviderToken } from './providers'; import { Type } from '../common/cli-types'; import { ConfiguredModule } from '../module/module-models'; import { CommandRoute } from '../command/command-routes'; import { Injector } from './injector'; /** * A set of utility functions that assist working with providers */ export declare class ProviderUtils { /** * A factory function that creates the appropriate `ProviderRef` from a `Provider` * @param provider provider from which ProviderRef must be created */ static toProviderRef(provider: Provider, parent: Injector, globalProviders: ProviderRef[]): ProviderRef; /** * Determines if two providers are 'equal' to one another by comparing their tokens * @param provider1 comparison provider 1 * @param provider2 comparison provider 2 */ static equal(provider1: Provider, provider2: Provider): boolean; static isGlobal(provider: Provider): boolean; static isSingleton(provider: Provider): boolean; /** * Returns the provider token based on the provider's type * @param provider provider */ static providerToken(provider: Provider): ProviderToken; /** * Determines if an object meets some sort of provider definition. This method has limitations as other constructors (Commands/Modules) could * be classified as providers * @param model object to check */ static isProvider(model: CommandRoute | Type | Provider | ConfiguredModule): boolean; /** * Returns a user-friendly name from a provider token to display in informative error messages * @param key The provider's token which can be a class constructor, string or symbol */ static providerName(key: ProviderToken): string; }