-
Notifications
You must be signed in to change notification settings - Fork 712
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
Moving from Symbol.for() to Symbol() doesn't resolve dependencies correctly #1559
Comments
I cannot reproduce this issue. The test case i use:
Version: 6.02 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Given that you use a global object which holds Symbol("Something") values and having bound a class to that identifier.
If I try to get that identifier from the container, i get a "No bindings found" error. When changing the Symbol to a Symbol.for, this issue is not present.
Expected Behavior
Symbol() should work just as well as Symbol.for.
Current Behavior
Using a Symbol() doesn't correctly resolve dependencies.
Possible Solution
Steps to Reproduce (for bugs)
const a = Symbol("a");
container.bind(a).to(MyClass);
container.getAsync(a);
Context
I would like to use true Symbols (as opposed to Symbol.for, which i don't see the point in using) as we're facing naming collisions.
Your Environment
Stack trace
The text was updated successfully, but these errors were encountered: