You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
Create a constant: const a = Symbol("a");
Bind something to it: container.bind(a).to(MyClass);
Get it from the container: container.getAsync(a);
Error: No matching bindings found for Symbol(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
Version used: 6.0.1
Stack trace
The text was updated successfully, but these errors were encountered:
Closing the issue for now since there seems to be no answer from the user. Feel free to submit a new one with a reproduction repo, a reproduction on codesandbox or in any other similar platform.
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: