thiagobustamante / typescript-ioc

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

Set constants #45

Closed pvieira91 closed 4 years ago

pvieira91 commented 5 years ago

Is there a way to set constants to container?

For example const config:IConfig = { connectionString: "xpto" };

Container.bind(config).provider(config).

thiagobustamante commented 4 years ago

Hi @pvieira91 . It is finally available.

I documented how to use it here.

And to put the constants in an external file, take a look here