import type { IServiceConstructor } from "./IServiceConstructor.js"; import type { IServiceDescriptor } from "./IServiceDescriptor.js"; import type { IServiceFactory } from "./IServiceFactory.js"; import type { IServiceImplementationResolver } from "./IServiceImplementationResolver.js"; import type { SingleServiceImplementation } from "./ServiceImplementation.js"; import type { SingleServiceType } from "./SingleServiceType.js"; export interface IServiceCollection extends Iterable> { getDescriptor(service: SingleServiceType): IServiceDescriptor; getDescriptors( service: SingleServiceType, ): readonly IServiceDescriptor[]; addScoped(service: SingleServiceImplementation): this; addScoped( service: SingleServiceType, factory: IServiceFactory, ): this; addScoped( service: SingleServiceType, constructor: IServiceConstructor, ): this; addScoped( service: SingleServiceType, resolver: IServiceImplementationResolver< T | SingleServiceImplementation >, ): this; addTransient(service: SingleServiceImplementation): this; addTransient( service: SingleServiceType, factory: IServiceFactory, ): this; addTransient( service: SingleServiceType, constructor: IServiceConstructor, ): this; addTransient( service: SingleServiceType, resolver: IServiceImplementationResolver< T | SingleServiceImplementation >, ): this; addSingleton(service: SingleServiceImplementation): this; addSingleton( service: SingleServiceType, factory: IServiceFactory, ): this; addSingleton( service: SingleServiceType, constructor: IServiceConstructor, ): this; addSingleton(service: SingleServiceType, implementation: T): this; addSingleton( service: SingleServiceType, resolver: IServiceImplementationResolver< T | SingleServiceImplementation >, ): this; }