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

feature: setting the token should infer the type #375

Open
theodorDiaconu opened this issue Jun 23, 2021 · 1 comment
Open

feature: setting the token should infer the type #375

theodorDiaconu opened this issue Jun 23, 2021 · 1 comment
Labels
type: feature Issues related to new features.

Comments

@theodorDiaconu
Copy link

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.
});
@theodorDiaconu theodorDiaconu added flag: needs discussion Issues which needs discussion before implementation. type: feature Issues related to new features. labels Jun 23, 2021
@NoNameProvided NoNameProvided removed the flag: needs discussion Issues which needs discussion before implementation. label Jan 13, 2022
@NoNameProvided
Copy link
Member

I agree this is a good idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature Issues related to new features.
Development

No branches or pull requests

2 participants