Skip to content
This repository was archived by the owner on Apr 21, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ console.print(person.name) // Prints "Timmy"
// We can resolve registered "groups"
container.resolveGroup('group1') // ~ [1, 2], not necessarily in the same order
container.resolveGroup('group2') // ~ [3, 4], not necessarily in the same order

// We can also resolve the container itself, and the return type will always be
// up to date. This is useful if we want to use the container as a factory for
// some of your dependencies.
const resolvedContainer = container.resolve('$')
```

It is also possible to register and resolve asynchronous factories and
Expand Down Expand Up @@ -117,6 +122,8 @@ dependencies. If you are curious, just try out:
- Stricter types for dependencies re-registration.
- Groups registration and resolution: very useful when we need to resolve all
dependencies belonging to a same category.
- Self-resolution. The container is able to resolve itself, to be used as a
factory.
- The container interface has been split into `ReaderContainer` and
`WriterContainer`, making it easier to use precise types.
- More extense documentation.
7 changes: 7 additions & 0 deletions lambda-ioc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ console.print(person.name) // Prints "Timmy"
// We can resolve registered "groups"
container.resolveGroup('group1') // ~ [1, 2], not necessarily in the same order
container.resolveGroup('group2') // ~ [3, 4], not necessarily in the same order

// We can also resolve the container itself, and the return type will always be
// up to date. This is useful if we want to use the container as a factory for
// some of your dependencies.
const resolvedContainer = container.resolve('$')
```

It is also possible to register and resolve asynchronous factories and
Expand Down Expand Up @@ -117,6 +122,8 @@ dependencies. If you are curious, just try out:
- Stricter types for dependencies re-registration.
- Groups registration and resolution: very useful when we need to resolve all
dependencies belonging to a same category.
- Self-resolution. The container is able to resolve itself, to be used as a
factory.
- The container interface has been split into `ReaderContainer` and
`WriterContainer`, making it easier to use precise types.
- More extense documentation.
Loading