import { ServiceRef } from '../services/system/types';
/**
 * TODO
 *
 * @public
 */
export type ExtensionPoint<T> = {
    id: string;
    /**
     * Utility for getting the type of the extension point, using `typeof extensionPoint.T`.
     * Attempting to actually read this value will result in an exception.
     */
    T: T;
    toString(): string;
    $$type: '@backstage/ExtensionPoint';
};
/**
 * The callbacks passed to the `register` method of a backend plugin.
 *
 * @public
 */
export interface BackendPluginRegistrationPoints {
    registerExtensionPoint<TExtensionPoint>(ref: ExtensionPoint<TExtensionPoint>, impl: TExtensionPoint): void;
    registerInit<Deps extends {
        [name in string]: unknown;
    }>(options: {
        deps: {
            [name in keyof Deps]: ServiceRef<Deps[name]>;
        };
        init(deps: Deps): Promise<void>;
    }): void;
}
/**
 * The callbacks passed to the `register` method of a backend module.
 *
 * @public
 */
export interface BackendModuleRegistrationPoints {
    registerExtensionPoint<TExtensionPoint>(ref: ExtensionPoint<TExtensionPoint>, impl: TExtensionPoint): void;
    registerInit<Deps extends {
        [name in string]: unknown;
    }>(options: {
        deps: {
            [name in keyof Deps]: ServiceRef<Deps[name]> | ExtensionPoint<Deps[name]>;
        };
        init(deps: Deps): Promise<void>;
    }): void;
}
