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

esp-js-di container.resolveGroup now allows for passing '...additionalDependencies #302

Merged
merged 1 commit into from
Apr 17, 2023

Conversation

KeithWoods
Copy link
Member

Add support to pass an array of items to inject into objects resolved in groups.

let A = class A { constructor(public arg1){} }; // has arg1 property
let B = class A { constructor(public arg1){} }; // has arg1 property
container.register('a', A)
    .transient()
    .inGroup('myGroup');
container.register('b', B)
    .transient()
    .inGroup('myGroup');
let myGroup = container.resolveGroup('myGroup', "arg1Foo");
myGroup[0].arg1 === "arg1Foo"; // true
myGroup[1].arg1 === "arg1Foo"; // true

@KeithWoods KeithWoods merged commit 9934c86 into master Apr 17, 2023
@raybooysen raybooysen deleted the espDiResolveGroupsTweak branch May 15, 2023 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant