Hi
Are there any plans to support async factories?
Thanks
Maybe that help you: https://github.com/inversify/InversifyJS/blob/master/wiki/provider_injection.md
thanks @TheAifam5 .
I've tried that and i found out that with providers, the consumer is injected with a function that returns a promise to an entity (()=>Promise<T>), instead of simply an entity (T).
What I mean by async factory is to register something like (context)=>Promise<T> and have the consumer be injected with T.
Actually I'm looking for the same functionality.
To be able to have provided instance automatically and delegate execution async factory to inversify, instead call it manually
+1, looking for the same thing for transparent Unit of Work implementation
@amir-arad @ifree92 @episage check out #1074
Most helpful comment
thanks @TheAifam5 .
I've tried that and i found out that with providers, the consumer is injected with a function that returns a promise to an entity (
()=>Promise<T>), instead of simply an entity (T).What I mean by async factory is to register something like
(context)=>Promise<T>and have the consumer be injected withT.