-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ContainerInstance): disable eager services by default
Eager services are harder to test, and make application behaviour more brittle. As a result, I do personally discourage using them. Therefore, by default they are now disabled. This will need more testing. Some further remarks below: Eager loading is generally discouraged, as it makes testing harder and makes the application more confusing to work with. For instance, see: [typestack/typedi#380](typestack/typedi#380). Consider an example of a DatabaseService with eager loading enabled. Once imported, database connections and more will immediately start taking place. In many cases, this will be unexpected and will ultimately be an unwanted side effect. Therefore, we place the eager loading functionality behind a toggleable option, which must be enabled prior to any eager loading strategies taking place.
- Loading branch information
1 parent
2f63f59
commit a8bae44
Showing
1 changed file
with
51 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters