Skip to content

Commit 5a6484a

Browse files
doc(dependency-injection): correct parameter decorator signatures
1 parent 926af61 commit 5a6484a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

doc/article/en-US/dependency-injection-basics.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Typically, you would use Decorators, an ES Next feature supported by both Babel
3232

3333
export class CustomerEditScreen {
3434
static inject() { return [CustomerService]; }
35-
35+
3636
constructor(customerService) {
3737
this.customerService = customerService;
3838
this.customer = null;
@@ -90,7 +90,7 @@ Notice that we use the `inject` decorator and that the constructor signature mat
9090

9191
export class CustomerEditScreen {
9292
static inject() { return [CustomerService, CommonDialogs, EventAggregator]; }
93-
93+
9494
constructor(customerService, dialogs, ea) {
9595
this.customerService = customerService;
9696
this.dialogs = dialogs;
@@ -339,10 +339,10 @@ If using TypeScript, keep in mind that `@autoinject` won't allow you to use `Res
339339

340340
* `lazy(key)`
341341
* `all(key)`
342-
* `optional(key)`
343-
* `parent(key)`
342+
* `optional(checkParent?)`
343+
* `parent`
344344
* `factory(key, asValue?)`
345-
* `newInstance(key)`
345+
* `newInstance(key?)`
346346

347347
Here's an example of how we might express a dependency on `HttpClient` that we may or may not actually need to use, depending on runtime scenarios:
348348

0 commit comments

Comments
 (0)