import { ReferenceSpec } from "./InterfaceSpec"; import { ReadonlyServiceLookup } from "./ServiceLookup"; import { ServiceRepr } from "./ServiceRepr"; export interface DependencyOptions { /** * All services known to the service layer. */ services?: readonly ServiceRepr[]; /** * References that must be satisfied by the services. */ requiredReferences?: readonly RequiredReference[]; } export type RequiredReference = UIDependency | FrameworkDependency; export type UIDependency = { type: "ui"; packageName: string; } & ReferenceSpec; export type FrameworkDependency = { type: "framework"; } & ReferenceSpec; export type ComputedServiceDependencies = Record; export interface VerifyDependenciesResult { /** * Precomputed dependencies for every service. * * Key: service id. */ serviceDependencies: Map; /** * Index structure mapping interface names to service instances. */ serviceLookup: ReadonlyServiceLookup; } /** * Visits all services and ensures that their dependencies can be satisfied by each other without a cycle. * * Throws an error if a cycle is detected or if a required service is never implemented. * * @returns an object containing the service index and precomputed dependency information */ export declare function verifyDependencies(options: DependencyOptions): VerifyDependenciesResult;