From fa1b40aaa05ed3affcde2fcf4fe675f8c32eebc1 Mon Sep 17 00:00:00 2001 From: dirkluijk Date: Tue, 8 Oct 2024 13:15:01 +0200 Subject: [PATCH] docs: improve code block on inheritance page --- docs/advanced/inheritance.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/advanced/inheritance.md b/docs/advanced/inheritance.md index 50d5548..c0327f9 100644 --- a/docs/advanced/inheritance.md +++ b/docs/advanced/inheritance.md @@ -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'