Closed hbroer closed 2 years ago
This new feature for @owja/ioc Version 2 implements plugins which will get executed just before the dependency is resolved.
type Plugin<Dependency = any, Target = any> = ( dependency: Dependency, target: Target | undefined, args: symbol[], token: MaybeToken<Dependency>, container: Container, ) => void;
container.bind(symbol).to(class).withPlugin(plugin);
container.addPlugin(plugin);
This new feature for @owja/ioc Version 2 implements plugins which will get executed just before the dependency is resolved.
The Plugin Interface
It can directly added to a dependency after binding it
It can added to the container itself and get executed with all dependencies
ToDo