Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inject dependencies to factory functions #8

Open
radmen opened this issue Apr 23, 2020 · 0 comments
Open

Inject dependencies to factory functions #8

radmen opened this issue Apr 23, 2020 · 0 comments
Labels
⚙️ container enhancement New feature or request

Comments

@radmen
Copy link
Contributor

radmen commented Apr 23, 2020

Container is able to inject the deps to the class objects. Would be nice if it could do the same for the functions.

e.g.

const fn = (dep1, dep2) => () => {
  // doo something
}

const selfwired = inject(fn, ['dep1', 'dep2']) // the binding should resolve a closure with injected dependencies.
@radmen radmen added enhancement New feature or request ⚙️ container labels Apr 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚙️ container enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant