Skip to content

feature: setting the token should infer the type #375

Open
@theodorDiaconu

Description

@theodorDiaconu

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.
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: featureIssues related to new features.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions