Skip to content

Commit

Permalink
docs: improve code block on inheritance page
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkluijk committed Oct 8, 2024
1 parent 23cfcf0 commit fa1b40a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/advanced/inheritance.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ container.bindAll(

This enables you to inject all instances of `ExampleService` using multi-injection:
```typescript
const fooService = container.get(FooService);
const barService = container.get(BarService);

const myServices = container.get(ExampleService, { multi: true });
// ^? Type will be inferred as `ExampleService[]`
// and will be the same instances as "fooService" and "barService'
Expand Down

0 comments on commit fa1b40a

Please sign in to comment.