typedi
typedi copied to clipboard
feature: setting the token should infer the type
Description
const token = new Token<string>("MY TOKEN");
container.set(token, 123); // no warning
Proposed solution
If it's a token infer the type, same for:
container.set({
id: token,
value: 123, // should trigger warning.
});
I agree this is a good idea.