thiagobustamante / typescript-ioc

A Lightweight annotation-based dependency injection container for typescript.
MIT License
526 stars 64 forks source link

get the type registered as provided #25

Closed nolazybits closed 6 years ago

nolazybits commented 6 years ago

Is it possible to expose the type provided like for instance Container.bind(PersonDAO).to(ManagerDAO); having a Container.getType(PersonDAO) would return the ManagerDAO type.

The use case is for instance, i am using class-transformer which requires the type needed when you want to create a object from plain json.

nolazybits commented 6 years ago

@thiagobustamante I have added a PR here https://github.com/thiagobustamante/typescript-ioc/pull/26

Thanks :)

thiagobustamante commented 6 years ago

Thanks!