I would to pass a module as dependency into another module.
The code looks something like this
const result = module({deps: require(“./dependency”}))
function module expects function dependency as argument.
However I get an error that dependency is not a function
However the same code works if I imported const deps=require('./dependency') and then pass deps into module as argument.
Any guidance how we can do dependency injection without declaring const deps