UNPKG

sahara

Version:

An inversion-of-control container for managing dependencies. Supports constructor, property and method injection

18 lines (17 loc) 870 B
import { MethodInjection, PropertyInjection, PropertyValueInjection } from './src/injection'; import { MemoryLifetime, TransientLifetime } from './src/lifetime'; import { Constructor } from './src/types'; export * from './src/container'; export * from './src/object-builder'; export * from './src/types'; export * from './src/lifetime'; export * from './src/injection'; export declare const inject: { propertyValue: <TType = unknown>(propertyName: keyof TType & string, value: unknown) => PropertyValueInjection<TType, unknown>; property: <T = unknown>(propertyName: keyof T & string, valueKey: Constructor<T> | string) => PropertyInjection<T>; method: <T = unknown>(methodName: keyof T & string, args?: unknown[] | null) => MethodInjection<T>; }; export declare const lifetime: { transient: () => TransientLifetime; memory: () => MemoryLifetime; };