docs: format null as code fragment + fix description of returned value (#40852)
PR Close #40852
This commit is contained in:
parent
e3c21c5465
commit
f4f7c33e1f
@ -126,7 +126,7 @@ Please check that 1) the type for the parameter at index ${
|
|||||||
* @param flags Optional flags that control how injection is executed.
|
* @param flags Optional flags that control how injection is executed.
|
||||||
* The flags correspond to injection strategies that can be specified with
|
* The flags correspond to injection strategies that can be specified with
|
||||||
* parameter decorators `@Host`, `@Self`, `@SkipSef`, and `@Optional`.
|
* parameter decorators `@Host`, `@Self`, `@SkipSef`, and `@Optional`.
|
||||||
* @returns True if injection is successful, null otherwise.
|
* @returns the injected value if injection is successful, `null` otherwise.
|
||||||
*
|
*
|
||||||
* @usageNotes
|
* @usageNotes
|
||||||
*
|
*
|
||||||
|
@ -71,14 +71,14 @@ export interface OptionalDecorator {
|
|||||||
/**
|
/**
|
||||||
* Parameter decorator to be used on constructor parameters,
|
* Parameter decorator to be used on constructor parameters,
|
||||||
* which marks the parameter as being an optional dependency.
|
* which marks the parameter as being an optional dependency.
|
||||||
* The DI framework provides null if the dependency is not found.
|
* The DI framework provides `null` if the dependency is not found.
|
||||||
*
|
*
|
||||||
* Can be used together with other parameter decorators
|
* Can be used together with other parameter decorators
|
||||||
* that modify how dependency injection operates.
|
* that modify how dependency injection operates.
|
||||||
*
|
*
|
||||||
* @usageNotes
|
* @usageNotes
|
||||||
*
|
*
|
||||||
* The following code allows the possibility of a null result:
|
* The following code allows the possibility of a `null` result:
|
||||||
*
|
*
|
||||||
* <code-example path="core/di/ts/metadata_spec.ts" region="Optional">
|
* <code-example path="core/di/ts/metadata_spec.ts" region="Optional">
|
||||||
* </code-example>
|
* </code-example>
|
||||||
@ -118,7 +118,7 @@ export interface SelfDecorator {
|
|||||||
* which tells the DI framework to start dependency resolution from the local injector.
|
* which tells the DI framework to start dependency resolution from the local injector.
|
||||||
*
|
*
|
||||||
* Resolution works upward through the injector hierarchy, so the children
|
* Resolution works upward through the injector hierarchy, so the children
|
||||||
* of this class must configure their own providers or be prepared for a null result.
|
* of this class must configure their own providers or be prepared for a `null` result.
|
||||||
*
|
*
|
||||||
* @usageNotes
|
* @usageNotes
|
||||||
*
|
*
|
||||||
@ -216,7 +216,7 @@ export interface HostDecorator {
|
|||||||
*
|
*
|
||||||
* @usageNotes
|
* @usageNotes
|
||||||
*
|
*
|
||||||
* The following shows use with the `@Optional` decorator, and allows for a null result.
|
* The following shows use with the `@Optional` decorator, and allows for a `null` result.
|
||||||
*
|
*
|
||||||
* <code-example path="core/di/ts/metadata_spec.ts" region="Host">
|
* <code-example path="core/di/ts/metadata_spec.ts" region="Host">
|
||||||
* </code-example>
|
* </code-example>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user