Skip to content

(v2) typedef not evaluated correctly override each other #48

@alebianco

Description

@alebianco

If i have two typedef like

typedef IServiceOne = IService<One>
typedef IServiceTwo = IService<Two>

with IService being an interface, and i try to map them to concrete classes, like

injector.map(IServiceOne).map(ServiceOne);
injector.map(IServiceTwo).map(ServiceTwo);

I'd get a warning because the mapping [IService -> ServiceTwo] is trying to override the mapping [IService -> ServiceOne]

It looks like the type parameter of my interface is not taken in consideration when creating the mapping.

[Workaround for this is to have IServiceOne and IServiceTwo as interfaces that extend IService instead of typedefs.]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions