-
Notifications
You must be signed in to change notification settings - Fork 4
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
Allow using a group of providers at once #16
Comments
const group = [a(), b(), c()]
const ctx = konn()
.useBeforeAll(group)
.done() A problem with this is when downstream depends on upstream, then those types are lost in the group definition. To fix we need a function helper. const abc = join(a(), b(), c())
const ctx = konn()
.useBeforeAll(abc)
.done() |
What if consumer wants to reuse repetitive parts of const ctx = konn()
.useBeforeAll(a())
.useBeforeAll(b())
.useBeforeEach(c())
.done() Ideas const abc = konn()
.useBeforeAll(a())
.useBeforeAll(b())
.useBeforeEach(c())
// maybe another file, maybe multiple
const ctx = konn().use(abc).done()
const ctx = konn().use(thing).use({ _use: (ctx) => /* ... */ }).done() This would require the Alternative using a new API const abc = group()
.useBeforeAll(a())
.useBeforeAll(b())
.useBeforeEach(c())
.done()
// maybe another file, maybe multiple
const ctx = konn().use(abc).done() |
Maybe different function name, const abc = providersGroup(a(), b(), c())
const ctx = konn()
.useBeforeAll(abc)
.done() |
Perceived Problem
What if consumer/producer wants to be able to have a,b,c providers packages up
into one group of providers?
Ideas / Proposed Solution(s)
The text was updated successfully, but these errors were encountered: