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

Convenience API to set an instance #8

Merged
merged 1 commit into from
May 17, 2019

Conversation

jkrems
Copy link
Collaborator

@jkrems jkrems commented May 16, 2019

We keep running into places where we have code like this:

registry.singleton.setFactory('simpleStaticThing', null, () => simpleStaticThing);

This can now be written as:

registry.singleton.setValue('simpleStaticThing', simpleStaticThing);

Copy link
Member

@dbushong dbushong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that always seemed kind of silly

@jkrems
Copy link
Collaborator Author

jkrems commented May 16, 2019

Other common ones are setClass etc. but I don't think we actually have use cases for them.

@jkrems jkrems merged commit f56126f into master May 17, 2019
@jkrems jkrems deleted the jkrems/feature/master/set-instance branch May 17, 2019 02:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants