Home > typeioc > IContainer > resolveWithDependencies
Resolves a service with dynamic dependencies
Signature:
resolveWithDependencies<R>(service: {}, dependencies: IDynamicDependency[]): R | never;
Parameter | Type | Description |
---|---|---|
service | {} |
service value registered prior resolution If service is null or undefined ArgumentError is thrown |
dependencies | IDynamicDependency[] |
an array of IDynamicDependency instances |
Returns:
R | never
A service gets resolved with all the dependencies provided without affecting original registration. All the services resolved with dynamic dependencies get transient (no scope, scope) life cycle assigned regardless of initial life cycle specified
Throws ResolutionError if not registration found