import { ServiceFactory, ServiceRef } from '@backstage/backend-plugin-api';
/**
 * Options for {@link ServiceFactoryTester}.
 * @public
 */
export interface ServiceFactoryTesterOptions {
    /**
     * Additional service factories to make available as dependencies.
     *
     * @remarks
     *
     * If a service factory is provided for a service that already has a default
     * implementation, the provided factory will override the default.
     */
    dependencies?: Array<ServiceFactory | (() => ServiceFactory)>;
}
/**
 * A utility to help test service factories in isolation.
 *
 * @public
 */
export declare class ServiceFactoryTester<TService, TScope extends 'root' | 'plugin'> {
    #private;
    /**
     * Creates a new {@link ServiceFactoryTester} used to test the provided subject.
     *
     * @param subject - The service factory to test.
     * @param options - Additional options
     * @returns A new tester instance for the provided subject.
     */
    static from<TService, TScope extends 'root' | 'plugin'>(subject: ServiceFactory<TService, TScope> | (() => ServiceFactory<TService, TScope>), options?: ServiceFactoryTesterOptions): ServiceFactoryTester<TService, TScope>;
    private constructor();
    /**
     * Returns the service instance for the subject.
     *
     * @remarks
     *
     * If the subject is a plugin scoped service factory a plugin ID
     * can be provided to instantiate the service for a specific plugin.
     *
     * By default the plugin ID 'test' is used.
     */
    get(...args: 'root' extends TScope ? [] : [pluginId?: string]): Promise<TService>;
    /**
     * Return the service instance for any of the provided dependencies or built-in services.
     *
     * @remarks
     *
     * A plugin ID can optionally be provided for plugin scoped services, otherwise the plugin ID 'test' is used.
     */
    getService<TGetService, TGetScope extends 'root' | 'plugin'>(service: ServiceRef<TGetService, TGetScope>, ...args: 'root' extends TGetScope ? [] : [pluginId?: string]): Promise<TGetService>;
}
