Milad-Akarie/injectable

Option to disable error on duplicate type registration

Opened this issue · 0 comments

get_it now supports registering the same type multiple times using enableRegisteringMultipleInstancesOfOneType for later use with getAll. I think it would be useful to add an option to InjectableInit that would turn off the error when registering duplicate types.

throwBoxed(
'${dep.typeImpl} [${dep.type}] envs: ${dep.environments} scope: ${dep.scope} \nis registered more than once under the same environment or in the same scope',
);