Skip to content

Adds the ability to register additional tokens via the @injectable decorator #263

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

Conversation

etiennenoel
Copy link
Collaborator

This would solve:

#115

Passing a simple argument to @injectable(), would allow the additional registrations of tokens for this current class. Allowing someone to tag their interfaces directly from the decorator and having them be resolved right away.

@Xapphire13 Any thoughts?

@etiennenoel etiennenoel requested a review from Copilot April 4, 2025 03:32
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

src/tests/global-container.test.ts:326

  • [nitpick] Consider renaming this test to distinguish it from the similar test starting at line 297; more descriptive names (e.g. indicating single vs. multiple token registrations) would improve clarity.
test("resolves all dependencies that provided additional tokens in the @injectable() decorator", () => {

@etiennenoel etiennenoel requested a review from Xapphire13 April 4, 2025 03:33
@Xapphire13
Copy link
Collaborator

LGTM!

@etiennenoel etiennenoel merged commit 2e3c099 into microsoft:master Apr 5, 2025
9 checks passed
@DJMcK DJMcK mentioned this pull request Apr 15, 2025
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.

2 participants