import 'reflect-metadata'; import { LazyObjectType, ObjectType } from './container'; /** * Constructor arguments recorded by {@link inject.new}. * * The container uses this metadata to create the injected dependency through * the active container instead of resolving an existing registered instance. */ export interface InjectConstruction { /** * Positional constructor arguments passed to the injected type. */ args: any[]; } /** * Decorator factory for container-managed constructor and property injection. * * Use `@inject(Type)` when a dependency should be resolved from the container. * Use `@inject.new(...args)` when the dependency must be constructed as a new * instance with explicit constructor arguments. */ export interface InjectDecorator { /** * Marks a property for lazy injection using the reflected property type. * * This overload is only valid for properties because constructor * parameters require an explicit service type. */ (): PropertyDecorator; /** * Marks a property or constructor parameter for injection using the given type. * * @param serviceType Type or lazy type resolver to resolve from the container. */ (serviceType: ObjectType | LazyObjectType): (target: object, propertyKey: string | symbol | undefined, parameterIndex?: number) => any; /** * Marks a property or constructor parameter to be created as a new instance. * * The target type is taken from emitted decorator metadata. The new instance * is created by the active container, so its own dependencies still use the * same container context. * * @param args Constructor arguments passed to the injected type. */ 'new'(...args: any[]): (target: object, propertyKey: string | symbol | undefined, parameterIndex?: number) => any; } export declare const inject: InjectDecorator; //# sourceMappingURL=inject.decorator.d.ts.map