docs(core): migrate @whatItDoes
tags to the description (#23185)
We get the overview for the doc by splitting off the first paragraph. PR Close #23185
This commit is contained in:

committed by
Igor Minar

parent
5bb14a68d2
commit
7dc150c1e8
@ -34,7 +34,6 @@ export type InjectableProvider = ValueSansProvider | ExistingSansProvider |
|
||||
*/
|
||||
export interface InjectableDecorator {
|
||||
/**
|
||||
* @whatItDoes A marker metadata that marks a class as available to {@link Injector} for creation.
|
||||
* @usageNotes
|
||||
* ```
|
||||
* @Injectable()
|
||||
@ -42,6 +41,8 @@ export interface InjectableDecorator {
|
||||
* ```
|
||||
*
|
||||
* @description
|
||||
* A marker metadata that marks a class as available to {@link Injector} for creation.
|
||||
*
|
||||
* For more details, see the {@linkDocs guide/dependency-injection "Dependency Injection Guide"}.
|
||||
*
|
||||
* ### Example
|
||||
|
@ -39,7 +39,6 @@ export class NullInjector implements Injector {
|
||||
}
|
||||
|
||||
/**
|
||||
* @whatItDoes Injector interface
|
||||
* @usageNotes
|
||||
* ```
|
||||
* const injector: Injector = ...;
|
||||
@ -47,6 +46,9 @@ export class NullInjector implements Injector {
|
||||
* ```
|
||||
*
|
||||
* @description
|
||||
*
|
||||
* Concrete injectors implement this interface.
|
||||
*
|
||||
* For more details, see the {@linkDocs guide/dependency-injection "Dependency Injection Guide"}.
|
||||
*
|
||||
* ### Example
|
||||
|
@ -20,7 +20,6 @@ import {EMPTY_ARRAY} from '../view/util';
|
||||
*/
|
||||
export interface InjectDecorator {
|
||||
/**
|
||||
* @whatItDoes A parameter decorator that specifies a dependency.
|
||||
* @usageNotes
|
||||
* ```
|
||||
* @Injectable()
|
||||
@ -30,6 +29,8 @@ export interface InjectDecorator {
|
||||
* ```
|
||||
*
|
||||
* @description
|
||||
* A parameter decorator that specifies a dependency.
|
||||
*
|
||||
* For more details, see the {@linkDocs guide/dependency-injection "Dependency Injection Guide"}.
|
||||
*
|
||||
* ### Example
|
||||
@ -72,8 +73,6 @@ export const Inject: InjectDecorator = makeParamDecorator('Inject', (token: any)
|
||||
*/
|
||||
export interface OptionalDecorator {
|
||||
/**
|
||||
* @whatItDoes A parameter metadata that marks a dependency as optional.
|
||||
* {@link Injector} provides `null` if the dependency is not found.
|
||||
* @usageNotes
|
||||
* ```
|
||||
* @Injectable()
|
||||
@ -83,6 +82,9 @@ export interface OptionalDecorator {
|
||||
* ```
|
||||
*
|
||||
* @description
|
||||
* A parameter metadata that marks a dependency as optional.
|
||||
* {@link Injector} provides `null` if the dependency is not found.
|
||||
*
|
||||
* For more details, see the {@linkDocs guide/dependency-injection "Dependency Injection Guide"}.
|
||||
*
|
||||
* ### Example
|
||||
@ -117,7 +119,6 @@ export const Optional: OptionalDecorator = makeParamDecorator('Optional');
|
||||
*/
|
||||
export interface SelfDecorator {
|
||||
/**
|
||||
* @whatItDoes Specifies that an {@link Injector} should retrieve a dependency only from itself.
|
||||
* @usageNotes
|
||||
* ```
|
||||
* @Injectable()
|
||||
@ -127,6 +128,8 @@ export interface SelfDecorator {
|
||||
* ```
|
||||
*
|
||||
* @description
|
||||
* Specifies that an {@link Injector} should retrieve a dependency only from itself.
|
||||
*
|
||||
* For more details, see the {@linkDocs guide/dependency-injection "Dependency Injection Guide"}.
|
||||
*
|
||||
* ### Example
|
||||
@ -162,7 +165,6 @@ export const Self: SelfDecorator = makeParamDecorator('Self');
|
||||
*/
|
||||
export interface SkipSelfDecorator {
|
||||
/**
|
||||
* @whatItDoes Specifies that the dependency resolution should start from the parent injector.
|
||||
* @usageNotes
|
||||
* ```
|
||||
* @Injectable()
|
||||
@ -172,6 +174,8 @@ export interface SkipSelfDecorator {
|
||||
* ```
|
||||
*
|
||||
* @description
|
||||
* Specifies that the dependency resolution should start from the parent injector.
|
||||
*
|
||||
* For more details, see the {@linkDocs guide/dependency-injection "Dependency Injection Guide"}.
|
||||
*
|
||||
* ### Example
|
||||
@ -206,8 +210,6 @@ export const SkipSelf: SkipSelfDecorator = makeParamDecorator('SkipSelf');
|
||||
*/
|
||||
export interface HostDecorator {
|
||||
/**
|
||||
* @whatItDoes Specifies that an injector should retrieve a dependency from any injector until
|
||||
* reaching the host element of the current component.
|
||||
* @usageNotes
|
||||
* ```
|
||||
* @Injectable()
|
||||
@ -217,6 +219,9 @@ export interface HostDecorator {
|
||||
* ```
|
||||
*
|
||||
* @description
|
||||
* Specifies that an injector should retrieve a dependency from any injector until
|
||||
* reaching the host element of the current component.
|
||||
*
|
||||
* For more details, see the {@linkDocs guide/dependency-injection "Dependency Injection Guide"}.
|
||||
*
|
||||
* ### Example
|
||||
|
@ -9,7 +9,6 @@
|
||||
import {Type} from '../type';
|
||||
|
||||
/**
|
||||
* @whatItDoes Configures the {@link Injector} to return a value for a token.
|
||||
* @usageNotes
|
||||
* ```
|
||||
* @Injectable(SomeModule, {useValue: 'someValue'})
|
||||
@ -17,6 +16,8 @@ import {Type} from '../type';
|
||||
* ```
|
||||
*
|
||||
* @description
|
||||
* Configures the {@link Injector} to return a value for a token.
|
||||
*
|
||||
* For more details, see the {@linkDocs guide/dependency-injection "Dependency Injection Guide"}.
|
||||
*
|
||||
* ### Example
|
||||
@ -33,13 +34,14 @@ export interface ValueSansProvider {
|
||||
}
|
||||
|
||||
/**
|
||||
* @whatItDoes Configures the {@link Injector} to return a value for a token.
|
||||
* @usageNotes
|
||||
* ```
|
||||
* const provider: ValueProvider = {provide: 'someToken', useValue: 'someValue'};
|
||||
* ```
|
||||
*
|
||||
* @description
|
||||
* Configures the {@link Injector} to return a value for a token.
|
||||
*
|
||||
* For more details, see the {@linkDocs guide/dependency-injection "Dependency Injection Guide"}.
|
||||
*
|
||||
* ### Example
|
||||
@ -66,7 +68,6 @@ export interface ValueProvider extends ValueSansProvider {
|
||||
}
|
||||
|
||||
/**
|
||||
* @whatItDoes Configures the {@link Injector} to return an instance of `useClass` for a token.
|
||||
* @usageNotes
|
||||
* ```
|
||||
* @Injectable(SomeModule, {useClass: MyService, deps: []})
|
||||
@ -74,6 +75,8 @@ export interface ValueProvider extends ValueSansProvider {
|
||||
* ```
|
||||
*
|
||||
* @description
|
||||
* Configures the {@link Injector} to return an instance of `useClass` for a token.
|
||||
*
|
||||
* For more details, see the {@linkDocs guide/dependency-injection "Dependency Injection Guide"}.
|
||||
*
|
||||
* ### Example
|
||||
@ -97,7 +100,6 @@ export interface StaticClassSansProvider {
|
||||
}
|
||||
|
||||
/**
|
||||
* @whatItDoes Configures the {@link Injector} to return an instance of `useClass` for a token.
|
||||
* @usageNotes
|
||||
* ```
|
||||
* @Injectable()
|
||||
@ -107,6 +109,8 @@ export interface StaticClassSansProvider {
|
||||
* ```
|
||||
*
|
||||
* @description
|
||||
* Configures the {@link Injector} to return an instance of `useClass` for a token.
|
||||
*
|
||||
* For more details, see the {@linkDocs guide/dependency-injection "Dependency Injection Guide"}.
|
||||
*
|
||||
* ### Example
|
||||
@ -136,7 +140,6 @@ export interface StaticClassProvider extends StaticClassSansProvider {
|
||||
}
|
||||
|
||||
/**
|
||||
* @whatItDoes Configures the {@link Injector} to return an instance of a token.
|
||||
* @usageNotes
|
||||
* ```
|
||||
* @Injectable(SomeModule, {deps: []})
|
||||
@ -144,6 +147,8 @@ export interface StaticClassProvider extends StaticClassSansProvider {
|
||||
* ```
|
||||
*
|
||||
* @description
|
||||
* Configures the {@link Injector} to return an instance of a token.
|
||||
*
|
||||
* For more details, see the {@linkDocs guide/dependency-injection "Dependency Injection Guide"}.
|
||||
*
|
||||
* ### Example
|
||||
@ -161,7 +166,6 @@ export interface ConstructorSansProvider {
|
||||
}
|
||||
|
||||
/**
|
||||
* @whatItDoes Configures the {@link Injector} to return an instance of a token.
|
||||
* @usageNotes
|
||||
* ```
|
||||
* @Injectable()
|
||||
@ -171,6 +175,8 @@ export interface ConstructorSansProvider {
|
||||
* ```
|
||||
*
|
||||
* @description
|
||||
* Configures the {@link Injector} to return an instance of a token.
|
||||
*
|
||||
* For more details, see the {@linkDocs guide/dependency-injection "Dependency Injection Guide"}.
|
||||
*
|
||||
* ### Example
|
||||
@ -197,7 +203,6 @@ export interface ConstructorProvider extends ConstructorSansProvider {
|
||||
}
|
||||
|
||||
/**
|
||||
* @whatItDoes Configures the {@link Injector} to return a value of another `useExisting` token.
|
||||
* @usageNotes
|
||||
* ```
|
||||
* @Injectable(SomeModule, {useExisting: 'someOtherToken'})
|
||||
@ -205,6 +210,8 @@ export interface ConstructorProvider extends ConstructorSansProvider {
|
||||
* ```
|
||||
*
|
||||
* @description
|
||||
* Configures the {@link Injector} to return a value of another `useExisting` token.
|
||||
*
|
||||
* For more details, see the {@linkDocs guide/dependency-injection "Dependency Injection Guide"}.
|
||||
*
|
||||
* ### Example
|
||||
@ -221,13 +228,14 @@ export interface ExistingSansProvider {
|
||||
}
|
||||
|
||||
/**
|
||||
* @whatItDoes Configures the {@link Injector} to return a value of another `useExisting` token.
|
||||
* @usageNotes
|
||||
* ```
|
||||
* const provider: ExistingProvider = {provide: 'someToken', useExisting: 'someOtherToken'};
|
||||
* ```
|
||||
*
|
||||
* @description
|
||||
* Configures the {@link Injector} to return a value of another `useExisting` token.
|
||||
*
|
||||
* For more details, see the {@linkDocs guide/dependency-injection "Dependency Injection Guide"}.
|
||||
*
|
||||
* ### Example
|
||||
@ -254,8 +262,6 @@ export interface ExistingProvider extends ExistingSansProvider {
|
||||
}
|
||||
|
||||
/**
|
||||
* @whatItDoes Configures the {@link Injector} to return a value by invoking a `useFactory`
|
||||
* function.
|
||||
* @usageNotes
|
||||
* ```
|
||||
* function serviceFactory() { ... }
|
||||
@ -265,6 +271,8 @@ export interface ExistingProvider extends ExistingSansProvider {
|
||||
* ```
|
||||
*
|
||||
* @description
|
||||
* Configures the {@link Injector} to return a value by invoking a `useFactory` function.
|
||||
*
|
||||
* For more details, see the {@linkDocs guide/dependency-injection "Dependency Injection Guide"}.
|
||||
*
|
||||
* ### Example
|
||||
@ -288,8 +296,6 @@ export interface FactorySansProvider {
|
||||
}
|
||||
|
||||
/**
|
||||
* @whatItDoes Configures the {@link Injector} to return a value by invoking a `useFactory`
|
||||
* function.
|
||||
* @usageNotes
|
||||
* ```
|
||||
* function serviceFactory() { ... }
|
||||
@ -298,6 +304,8 @@ export interface FactorySansProvider {
|
||||
* ```
|
||||
*
|
||||
* @description
|
||||
* Configures the {@link Injector} to return a value by invoking a `useFactory` function.
|
||||
*
|
||||
* For more details, see the {@linkDocs guide/dependency-injection "Dependency Injection Guide"}.
|
||||
*
|
||||
* ### Example
|
||||
@ -327,12 +335,12 @@ export interface FactoryProvider extends FactorySansProvider {
|
||||
}
|
||||
|
||||
/**
|
||||
* @whatItDoes Describes how the {@link Injector} should be configured in a static way (Without
|
||||
* reflection).
|
||||
* @usageNotes
|
||||
* See {@link ValueProvider}, {@link ExistingProvider}, {@link FactoryProvider}.
|
||||
*
|
||||
* @description
|
||||
* Describes how the {@link Injector} should be configured in a static way (Without reflection).
|
||||
*
|
||||
* For more details, see the {@linkDocs guide/dependency-injection "Dependency Injection Guide"}.
|
||||
*
|
||||
* @stable
|
||||
@ -342,8 +350,6 @@ export type StaticProvider = ValueProvider | ExistingProvider | StaticClassProvi
|
||||
|
||||
|
||||
/**
|
||||
* @whatItDoes Configures the {@link Injector} to return an instance of `Type` when `Type' is used
|
||||
* as token.
|
||||
* @usageNotes
|
||||
* ```
|
||||
* @Injectable()
|
||||
@ -353,6 +359,7 @@ export type StaticProvider = ValueProvider | ExistingProvider | StaticClassProvi
|
||||
* ```
|
||||
*
|
||||
* @description
|
||||
* Configures the {@link Injector} to return an instance of `Type` when `Type' is used as the token.
|
||||
*
|
||||
* Create an instance by invoking the `new` operator and supplying additional arguments.
|
||||
* This form is a short form of `TypeProvider`;
|
||||
@ -368,8 +375,6 @@ export type StaticProvider = ValueProvider | ExistingProvider | StaticClassProvi
|
||||
export interface TypeProvider extends Type<any> {}
|
||||
|
||||
/**
|
||||
* @whatItDoes Configures the {@link Injector} to return a value by invoking a `useClass`
|
||||
* function.
|
||||
* @usageNotes
|
||||
* ```
|
||||
*
|
||||
@ -380,6 +385,8 @@ export interface TypeProvider extends Type<any> {}
|
||||
* ```
|
||||
*
|
||||
* @description
|
||||
* Configures the {@link Injector} to return a value by invoking a `useClass` function.
|
||||
*
|
||||
* For more details, see the {@linkDocs guide/dependency-injection "Dependency Injection Guide"}.
|
||||
*
|
||||
* ### Example
|
||||
@ -396,7 +403,6 @@ export interface ClassSansProvider {
|
||||
}
|
||||
|
||||
/**
|
||||
* @whatItDoes Configures the {@link Injector} to return an instance of `useClass` for a token.
|
||||
* @usageNotes
|
||||
* ```
|
||||
* @Injectable()
|
||||
@ -406,6 +412,8 @@ export interface ClassSansProvider {
|
||||
* ```
|
||||
*
|
||||
* @description
|
||||
* Configures the {@link Injector} to return an instance of `useClass` for a token.
|
||||
*
|
||||
* For more details, see the {@linkDocs guide/dependency-injection "Dependency Injection Guide"}.
|
||||
*
|
||||
* ### Example
|
||||
@ -435,11 +443,12 @@ export interface ClassProvider extends ClassSansProvider {
|
||||
}
|
||||
|
||||
/**
|
||||
* @whatItDoes Describes how the {@link Injector} should be configured.
|
||||
* @usageNotes
|
||||
* See {@link TypeProvider}, {@link ClassProvider}, {@link StaticProvider}.
|
||||
*
|
||||
* @description
|
||||
* Describes how the {@link Injector} should be configured.
|
||||
*
|
||||
* For more details, see the {@linkDocs guide/dependency-injection "Dependency Injection Guide"}.
|
||||
*
|
||||
* @stable
|
||||
|
Reference in New Issue
Block a user