import { ServiceMetadata } from './service-metadata.interface'; import { AnyServiceDependency } from './service-dependency.interface'; import { RequireExactlyOne, SetRequired } from 'type-fest'; type OptionalKeys = 'type' | 'factory' | 'value'; type ServiceMetadataWithoutDeps = Omit, 'dependencies'>; /** * The public ServiceOptions is partial object of ServiceMetadata and either one * of the following is set: `type`, `factory`, `value` but not more than one. */ export type ServiceOptions = Partial, OptionalKeys>> & Partial, OptionalKeys>> & { dependencies?: AnyServiceDependency[]; }; export type ServiceOptionsWithDependencies = ServiceOptions & SetRequired, 'dependencies'>; export type ServiceOptionsWithoutDependencies = Omit, 'dependencies'>; export {};