docs(core): migrate deprecated `@howToUse` tags (#23185)
These have now become `@usageNotes` but later they might be moved into a section of the description. PR Close #23185
This commit is contained in:
parent
381da1af45
commit
5bb14a68d2
|
@ -35,7 +35,7 @@ export type InjectableProvider = ValueSansProvider | ExistingSansProvider |
|
|||
export interface InjectableDecorator {
|
||||
/**
|
||||
* @whatItDoes A marker metadata that marks a class as available to {@link Injector} for creation.
|
||||
* @howToUse
|
||||
* @usageNotes
|
||||
* ```
|
||||
* @Injectable()
|
||||
* class Car {}
|
||||
|
|
|
@ -40,7 +40,7 @@ export class NullInjector implements Injector {
|
|||
|
||||
/**
|
||||
* @whatItDoes Injector interface
|
||||
* @howToUse
|
||||
* @usageNotes
|
||||
* ```
|
||||
* const injector: Injector = ...;
|
||||
* injector.get(...);
|
||||
|
|
|
@ -21,7 +21,7 @@ import {EMPTY_ARRAY} from '../view/util';
|
|||
export interface InjectDecorator {
|
||||
/**
|
||||
* @whatItDoes A parameter decorator that specifies a dependency.
|
||||
* @howToUse
|
||||
* @usageNotes
|
||||
* ```
|
||||
* @Injectable()
|
||||
* class Car {
|
||||
|
@ -74,7 +74,7 @@ export interface OptionalDecorator {
|
|||
/**
|
||||
* @whatItDoes A parameter metadata that marks a dependency as optional.
|
||||
* {@link Injector} provides `null` if the dependency is not found.
|
||||
* @howToUse
|
||||
* @usageNotes
|
||||
* ```
|
||||
* @Injectable()
|
||||
* class Car {
|
||||
|
@ -118,7 +118,7 @@ export const Optional: OptionalDecorator = makeParamDecorator('Optional');
|
|||
export interface SelfDecorator {
|
||||
/**
|
||||
* @whatItDoes Specifies that an {@link Injector} should retrieve a dependency only from itself.
|
||||
* @howToUse
|
||||
* @usageNotes
|
||||
* ```
|
||||
* @Injectable()
|
||||
* class Car {
|
||||
|
@ -163,7 +163,7 @@ export const Self: SelfDecorator = makeParamDecorator('Self');
|
|||
export interface SkipSelfDecorator {
|
||||
/**
|
||||
* @whatItDoes Specifies that the dependency resolution should start from the parent injector.
|
||||
* @howToUse
|
||||
* @usageNotes
|
||||
* ```
|
||||
* @Injectable()
|
||||
* class Car {
|
||||
|
@ -208,7 +208,7 @@ export interface HostDecorator {
|
|||
/**
|
||||
* @whatItDoes Specifies that an injector should retrieve a dependency from any injector until
|
||||
* reaching the host element of the current component.
|
||||
* @howToUse
|
||||
* @usageNotes
|
||||
* ```
|
||||
* @Injectable()
|
||||
* class Car {
|
||||
|
|
|
@ -10,7 +10,7 @@ import {Type} from '../type';
|
|||
|
||||
/**
|
||||
* @whatItDoes Configures the {@link Injector} to return a value for a token.
|
||||
* @howToUse
|
||||
* @usageNotes
|
||||
* ```
|
||||
* @Injectable(SomeModule, {useValue: 'someValue'})
|
||||
* class SomeClass {}
|
||||
|
@ -34,7 +34,7 @@ export interface ValueSansProvider {
|
|||
|
||||
/**
|
||||
* @whatItDoes Configures the {@link Injector} to return a value for a token.
|
||||
* @howToUse
|
||||
* @usageNotes
|
||||
* ```
|
||||
* const provider: ValueProvider = {provide: 'someToken', useValue: 'someValue'};
|
||||
* ```
|
||||
|
@ -67,7 +67,7 @@ export interface ValueProvider extends ValueSansProvider {
|
|||
|
||||
/**
|
||||
* @whatItDoes Configures the {@link Injector} to return an instance of `useClass` for a token.
|
||||
* @howToUse
|
||||
* @usageNotes
|
||||
* ```
|
||||
* @Injectable(SomeModule, {useClass: MyService, deps: []})
|
||||
* class MyService {}
|
||||
|
@ -98,7 +98,7 @@ export interface StaticClassSansProvider {
|
|||
|
||||
/**
|
||||
* @whatItDoes Configures the {@link Injector} to return an instance of `useClass` for a token.
|
||||
* @howToUse
|
||||
* @usageNotes
|
||||
* ```
|
||||
* @Injectable()
|
||||
* class MyService {}
|
||||
|
@ -137,7 +137,7 @@ export interface StaticClassProvider extends StaticClassSansProvider {
|
|||
|
||||
/**
|
||||
* @whatItDoes Configures the {@link Injector} to return an instance of a token.
|
||||
* @howToUse
|
||||
* @usageNotes
|
||||
* ```
|
||||
* @Injectable(SomeModule, {deps: []})
|
||||
* class MyService {}
|
||||
|
@ -162,7 +162,7 @@ export interface ConstructorSansProvider {
|
|||
|
||||
/**
|
||||
* @whatItDoes Configures the {@link Injector} to return an instance of a token.
|
||||
* @howToUse
|
||||
* @usageNotes
|
||||
* ```
|
||||
* @Injectable()
|
||||
* class MyService {}
|
||||
|
@ -198,7 +198,7 @@ export interface ConstructorProvider extends ConstructorSansProvider {
|
|||
|
||||
/**
|
||||
* @whatItDoes Configures the {@link Injector} to return a value of another `useExisting` token.
|
||||
* @howToUse
|
||||
* @usageNotes
|
||||
* ```
|
||||
* @Injectable(SomeModule, {useExisting: 'someOtherToken'})
|
||||
* class SomeClass {}
|
||||
|
@ -222,7 +222,7 @@ export interface ExistingSansProvider {
|
|||
|
||||
/**
|
||||
* @whatItDoes Configures the {@link Injector} to return a value of another `useExisting` token.
|
||||
* @howToUse
|
||||
* @usageNotes
|
||||
* ```
|
||||
* const provider: ExistingProvider = {provide: 'someToken', useExisting: 'someOtherToken'};
|
||||
* ```
|
||||
|
@ -256,7 +256,7 @@ export interface ExistingProvider extends ExistingSansProvider {
|
|||
/**
|
||||
* @whatItDoes Configures the {@link Injector} to return a value by invoking a `useFactory`
|
||||
* function.
|
||||
* @howToUse
|
||||
* @usageNotes
|
||||
* ```
|
||||
* function serviceFactory() { ... }
|
||||
*
|
||||
|
@ -290,7 +290,7 @@ export interface FactorySansProvider {
|
|||
/**
|
||||
* @whatItDoes Configures the {@link Injector} to return a value by invoking a `useFactory`
|
||||
* function.
|
||||
* @howToUse
|
||||
* @usageNotes
|
||||
* ```
|
||||
* function serviceFactory() { ... }
|
||||
*
|
||||
|
@ -329,7 +329,7 @@ export interface FactoryProvider extends FactorySansProvider {
|
|||
/**
|
||||
* @whatItDoes Describes how the {@link Injector} should be configured in a static way (Without
|
||||
* reflection).
|
||||
* @howToUse
|
||||
* @usageNotes
|
||||
* See {@link ValueProvider}, {@link ExistingProvider}, {@link FactoryProvider}.
|
||||
*
|
||||
* @description
|
||||
|
@ -344,7 +344,7 @@ export type StaticProvider = ValueProvider | ExistingProvider | StaticClassProvi
|
|||
/**
|
||||
* @whatItDoes Configures the {@link Injector} to return an instance of `Type` when `Type' is used
|
||||
* as token.
|
||||
* @howToUse
|
||||
* @usageNotes
|
||||
* ```
|
||||
* @Injectable()
|
||||
* class MyService {}
|
||||
|
@ -370,7 +370,7 @@ export interface TypeProvider extends Type<any> {}
|
|||
/**
|
||||
* @whatItDoes Configures the {@link Injector} to return a value by invoking a `useClass`
|
||||
* function.
|
||||
* @howToUse
|
||||
* @usageNotes
|
||||
* ```
|
||||
*
|
||||
* class SomeClassImpl {}
|
||||
|
@ -397,7 +397,7 @@ export interface ClassSansProvider {
|
|||
|
||||
/**
|
||||
* @whatItDoes Configures the {@link Injector} to return an instance of `useClass` for a token.
|
||||
* @howToUse
|
||||
* @usageNotes
|
||||
* ```
|
||||
* @Injectable()
|
||||
* class MyService {}
|
||||
|
@ -436,7 +436,7 @@ export interface ClassProvider extends ClassSansProvider {
|
|||
|
||||
/**
|
||||
* @whatItDoes Describes how the {@link Injector} should be configured.
|
||||
* @howToUse
|
||||
* @usageNotes
|
||||
* See {@link TypeProvider}, {@link ClassProvider}, {@link StaticProvider}.
|
||||
*
|
||||
* @description
|
||||
|
|
|
@ -143,7 +143,7 @@ export interface ContentChildrenDecorator {
|
|||
/**
|
||||
* @whatItDoes Configures a content query.
|
||||
*
|
||||
* @howToUse
|
||||
* @usageNotes
|
||||
*
|
||||
* {@example core/di/ts/contentChildren/content_children_howto.ts region='HowTo'}
|
||||
*
|
||||
|
@ -205,7 +205,7 @@ export interface ContentChildDecorator {
|
|||
/**
|
||||
* @whatItDoes Configures a content query.
|
||||
*
|
||||
* @howToUse
|
||||
* @usageNotes
|
||||
*
|
||||
* {@example core/di/ts/contentChild/content_child_howto.ts region='HowTo'}
|
||||
*
|
||||
|
@ -266,7 +266,7 @@ export interface ViewChildrenDecorator {
|
|||
/**
|
||||
* @whatItDoes Configures a view query.
|
||||
*
|
||||
* @howToUse
|
||||
* @usageNotes
|
||||
*
|
||||
* {@example core/di/ts/viewChildren/view_children_howto.ts region='HowTo'}
|
||||
*
|
||||
|
@ -325,7 +325,7 @@ export interface ViewChildDecorator {
|
|||
/**
|
||||
* @whatItDoes Configures a view query.
|
||||
*
|
||||
* @howToUse
|
||||
* @usageNotes
|
||||
*
|
||||
* {@example core/di/ts/viewChild/view_child_howto.ts region='HowTo'}
|
||||
*
|
||||
|
|
|
@ -24,7 +24,7 @@ export interface DirectiveDecorator {
|
|||
* @whatItDoes Marks a class as an Angular directive and collects directive configuration
|
||||
* metadata.
|
||||
*
|
||||
* @howToUse
|
||||
* @usageNotes
|
||||
*
|
||||
* ```
|
||||
* import {Directive} from '@angular/core';
|
||||
|
@ -413,7 +413,7 @@ export interface ComponentDecorator {
|
|||
* @whatItDoes Marks a class as an Angular component and collects component configuration
|
||||
* metadata.
|
||||
*
|
||||
* @howToUse
|
||||
* @usageNotes
|
||||
*
|
||||
* {@example core/ts/metadata/metadata.ts region='component'}
|
||||
*
|
||||
|
|
|
@ -18,7 +18,7 @@ export interface SimpleChanges { [propName: string]: SimpleChange; }
|
|||
|
||||
/**
|
||||
* @whatItDoes Lifecycle hook that is called when any data-bound property of a directive changes.
|
||||
* @howToUse
|
||||
* @usageNotes
|
||||
* {@example core/ts/metadata/lifecycle_hooks_spec.ts region='OnChanges'}
|
||||
*
|
||||
* @description
|
||||
|
@ -35,7 +35,7 @@ export interface OnChanges { ngOnChanges(changes: SimpleChanges): void; }
|
|||
/**
|
||||
* @whatItDoes Lifecycle hook that is called after data-bound properties of a directive are
|
||||
* initialized.
|
||||
* @howToUse
|
||||
* @usageNotes
|
||||
* {@example core/ts/metadata/lifecycle_hooks_spec.ts region='OnInit'}
|
||||
*
|
||||
* @description
|
||||
|
@ -51,7 +51,7 @@ export interface OnInit { ngOnInit(): void; }
|
|||
|
||||
/**
|
||||
* @whatItDoes Lifecycle hook that is called when Angular dirty checks a directive.
|
||||
* @howToUse
|
||||
* @usageNotes
|
||||
* {@example core/ts/metadata/lifecycle_hooks_spec.ts region='DoCheck'}
|
||||
*
|
||||
* @description
|
||||
|
@ -74,7 +74,7 @@ export interface DoCheck { ngDoCheck(): void; }
|
|||
|
||||
/**
|
||||
* @whatItDoes Lifecycle hook that is called when a directive, pipe or service is destroyed.
|
||||
* @howToUse
|
||||
* @usageNotes
|
||||
* {@example core/ts/metadata/lifecycle_hooks_spec.ts region='OnDestroy'}
|
||||
*
|
||||
* @description
|
||||
|
@ -91,7 +91,7 @@ export interface OnDestroy { ngOnDestroy(): void; }
|
|||
*
|
||||
* @whatItDoes Lifecycle hook that is called after a directive's content has been fully
|
||||
* initialized.
|
||||
* @howToUse
|
||||
* @usageNotes
|
||||
* {@example core/ts/metadata/lifecycle_hooks_spec.ts region='AfterContentInit'}
|
||||
*
|
||||
* @description
|
||||
|
@ -103,7 +103,7 @@ export interface AfterContentInit { ngAfterContentInit(): void; }
|
|||
|
||||
/**
|
||||
* @whatItDoes Lifecycle hook that is called after every check of a directive's content.
|
||||
* @howToUse
|
||||
* @usageNotes
|
||||
* {@example core/ts/metadata/lifecycle_hooks_spec.ts region='AfterContentChecked'}
|
||||
*
|
||||
* @description
|
||||
|
@ -116,7 +116,7 @@ export interface AfterContentChecked { ngAfterContentChecked(): void; }
|
|||
/**
|
||||
* @whatItDoes Lifecycle hook that is called after a component's view has been fully
|
||||
* initialized.
|
||||
* @howToUse
|
||||
* @usageNotes
|
||||
* {@example core/ts/metadata/lifecycle_hooks_spec.ts region='AfterViewInit'}
|
||||
*
|
||||
* @description
|
||||
|
@ -128,7 +128,7 @@ export interface AfterViewInit { ngAfterViewInit(): void; }
|
|||
|
||||
/**
|
||||
* @whatItDoes Lifecycle hook that is called after every check of a component's view.
|
||||
* @howToUse
|
||||
* @usageNotes
|
||||
* {@example core/ts/metadata/lifecycle_hooks_spec.ts region='AfterViewChecked'}
|
||||
*
|
||||
* @description
|
||||
|
|
Loading…
Reference in New Issue