Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to disable error on duplicate type registration #450

Open
kasefuchs opened this issue Apr 13, 2024 · 0 comments
Open

Option to disable error on duplicate type registration #450

kasefuchs opened this issue Apr 13, 2024 · 0 comments

Comments

@kasefuchs
Copy link

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',
);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant