9 ms·
How do you dependency inject a ES module?
by depaulagu 4y ago
How do you dependency inject a ES module?
- serverlessmania 4y agoYou'll export a function from your esModule if you want to inject export const myFn = (...deps) => You don't need anything else, for encapsulation you have the EsModule, that what OP meant.
- depaulagu 4y agoah, thanks, I thought it was something different.
- WHATDOESIT 4y agoYou have dynamic imports too if you need IoC.