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:
Pete Bacon Darwin 2018-04-05 09:58:02 +01:00 committed by Igor Minar
parent 381da1af45
commit 5bb14a68d2
7 changed files with 36 additions and 36 deletions

View File

@ -35,7 +35,7 @@ export type InjectableProvider = ValueSansProvider | ExistingSansProvider |
export interface InjectableDecorator { export interface InjectableDecorator {
/** /**
* @whatItDoes A marker metadata that marks a class as available to {@link Injector} for creation. * @whatItDoes A marker metadata that marks a class as available to {@link Injector} for creation.
* @howToUse * @usageNotes
* ``` * ```
* @Injectable() * @Injectable()
* class Car {} * class Car {}

View File

@ -40,7 +40,7 @@ export class NullInjector implements Injector {
/** /**
* @whatItDoes Injector interface * @whatItDoes Injector interface
* @howToUse * @usageNotes
* ``` * ```
* const injector: Injector = ...; * const injector: Injector = ...;
* injector.get(...); * injector.get(...);

View File

@ -21,7 +21,7 @@ import {EMPTY_ARRAY} from '../view/util';
export interface InjectDecorator { export interface InjectDecorator {
/** /**
* @whatItDoes A parameter decorator that specifies a dependency. * @whatItDoes A parameter decorator that specifies a dependency.
* @howToUse * @usageNotes
* ``` * ```
* @Injectable() * @Injectable()
* class Car { * class Car {
@ -74,7 +74,7 @@ export interface OptionalDecorator {
/** /**
* @whatItDoes A parameter metadata that marks a dependency as optional. * @whatItDoes A parameter metadata that marks a dependency as optional.
* {@link Injector} provides `null` if the dependency is not found. * {@link Injector} provides `null` if the dependency is not found.
* @howToUse * @usageNotes
* ``` * ```
* @Injectable() * @Injectable()
* class Car { * class Car {
@ -118,7 +118,7 @@ export const Optional: OptionalDecorator = makeParamDecorator('Optional');
export interface SelfDecorator { export interface SelfDecorator {
/** /**
* @whatItDoes Specifies that an {@link Injector} should retrieve a dependency only from itself. * @whatItDoes Specifies that an {@link Injector} should retrieve a dependency only from itself.
* @howToUse * @usageNotes
* ``` * ```
* @Injectable() * @Injectable()
* class Car { * class Car {
@ -163,7 +163,7 @@ export const Self: SelfDecorator = makeParamDecorator('Self');
export interface SkipSelfDecorator { export interface SkipSelfDecorator {
/** /**
* @whatItDoes Specifies that the dependency resolution should start from the parent injector. * @whatItDoes Specifies that the dependency resolution should start from the parent injector.
* @howToUse * @usageNotes
* ``` * ```
* @Injectable() * @Injectable()
* class Car { * class Car {
@ -208,7 +208,7 @@ export interface HostDecorator {
/** /**
* @whatItDoes Specifies that an injector should retrieve a dependency from any injector until * @whatItDoes Specifies that an injector should retrieve a dependency from any injector until
* reaching the host element of the current component. * reaching the host element of the current component.
* @howToUse * @usageNotes
* ``` * ```
* @Injectable() * @Injectable()
* class Car { * class Car {

View File

@ -10,7 +10,7 @@ import {Type} from '../type';
/** /**
* @whatItDoes Configures the {@link Injector} to return a value for a token. * @whatItDoes Configures the {@link Injector} to return a value for a token.
* @howToUse * @usageNotes
* ``` * ```
* @Injectable(SomeModule, {useValue: 'someValue'}) * @Injectable(SomeModule, {useValue: 'someValue'})
* class SomeClass {} * class SomeClass {}
@ -34,7 +34,7 @@ export interface ValueSansProvider {
/** /**
* @whatItDoes Configures the {@link Injector} to return a value for a token. * @whatItDoes Configures the {@link Injector} to return a value for a token.
* @howToUse * @usageNotes
* ``` * ```
* const provider: ValueProvider = {provide: 'someToken', useValue: 'someValue'}; * 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. * @whatItDoes Configures the {@link Injector} to return an instance of `useClass` for a token.
* @howToUse * @usageNotes
* ``` * ```
* @Injectable(SomeModule, {useClass: MyService, deps: []}) * @Injectable(SomeModule, {useClass: MyService, deps: []})
* class MyService {} * class MyService {}
@ -98,7 +98,7 @@ export interface StaticClassSansProvider {
/** /**
* @whatItDoes Configures the {@link Injector} to return an instance of `useClass` for a token. * @whatItDoes Configures the {@link Injector} to return an instance of `useClass` for a token.
* @howToUse * @usageNotes
* ``` * ```
* @Injectable() * @Injectable()
* class MyService {} * class MyService {}
@ -137,7 +137,7 @@ export interface StaticClassProvider extends StaticClassSansProvider {
/** /**
* @whatItDoes Configures the {@link Injector} to return an instance of a token. * @whatItDoes Configures the {@link Injector} to return an instance of a token.
* @howToUse * @usageNotes
* ``` * ```
* @Injectable(SomeModule, {deps: []}) * @Injectable(SomeModule, {deps: []})
* class MyService {} * class MyService {}
@ -162,7 +162,7 @@ export interface ConstructorSansProvider {
/** /**
* @whatItDoes Configures the {@link Injector} to return an instance of a token. * @whatItDoes Configures the {@link Injector} to return an instance of a token.
* @howToUse * @usageNotes
* ``` * ```
* @Injectable() * @Injectable()
* class MyService {} * class MyService {}
@ -198,7 +198,7 @@ export interface ConstructorProvider extends ConstructorSansProvider {
/** /**
* @whatItDoes Configures the {@link Injector} to return a value of another `useExisting` token. * @whatItDoes Configures the {@link Injector} to return a value of another `useExisting` token.
* @howToUse * @usageNotes
* ``` * ```
* @Injectable(SomeModule, {useExisting: 'someOtherToken'}) * @Injectable(SomeModule, {useExisting: 'someOtherToken'})
* class SomeClass {} * class SomeClass {}
@ -222,7 +222,7 @@ export interface ExistingSansProvider {
/** /**
* @whatItDoes Configures the {@link Injector} to return a value of another `useExisting` token. * @whatItDoes Configures the {@link Injector} to return a value of another `useExisting` token.
* @howToUse * @usageNotes
* ``` * ```
* const provider: ExistingProvider = {provide: 'someToken', useExisting: 'someOtherToken'}; * 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` * @whatItDoes Configures the {@link Injector} to return a value by invoking a `useFactory`
* function. * function.
* @howToUse * @usageNotes
* ``` * ```
* function serviceFactory() { ... } * function serviceFactory() { ... }
* *
@ -290,7 +290,7 @@ export interface FactorySansProvider {
/** /**
* @whatItDoes Configures the {@link Injector} to return a value by invoking a `useFactory` * @whatItDoes Configures the {@link Injector} to return a value by invoking a `useFactory`
* function. * function.
* @howToUse * @usageNotes
* ``` * ```
* function serviceFactory() { ... } * 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 * @whatItDoes Describes how the {@link Injector} should be configured in a static way (Without
* reflection). * reflection).
* @howToUse * @usageNotes
* See {@link ValueProvider}, {@link ExistingProvider}, {@link FactoryProvider}. * See {@link ValueProvider}, {@link ExistingProvider}, {@link FactoryProvider}.
* *
* @description * @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 * @whatItDoes Configures the {@link Injector} to return an instance of `Type` when `Type' is used
* as token. * as token.
* @howToUse * @usageNotes
* ``` * ```
* @Injectable() * @Injectable()
* class MyService {} * 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` * @whatItDoes Configures the {@link Injector} to return a value by invoking a `useClass`
* function. * function.
* @howToUse * @usageNotes
* ``` * ```
* *
* class SomeClassImpl {} * class SomeClassImpl {}
@ -397,7 +397,7 @@ export interface ClassSansProvider {
/** /**
* @whatItDoes Configures the {@link Injector} to return an instance of `useClass` for a token. * @whatItDoes Configures the {@link Injector} to return an instance of `useClass` for a token.
* @howToUse * @usageNotes
* ``` * ```
* @Injectable() * @Injectable()
* class MyService {} * class MyService {}
@ -436,7 +436,7 @@ export interface ClassProvider extends ClassSansProvider {
/** /**
* @whatItDoes Describes how the {@link Injector} should be configured. * @whatItDoes Describes how the {@link Injector} should be configured.
* @howToUse * @usageNotes
* See {@link TypeProvider}, {@link ClassProvider}, {@link StaticProvider}. * See {@link TypeProvider}, {@link ClassProvider}, {@link StaticProvider}.
* *
* @description * @description

View File

@ -143,7 +143,7 @@ export interface ContentChildrenDecorator {
/** /**
* @whatItDoes Configures a content query. * @whatItDoes Configures a content query.
* *
* @howToUse * @usageNotes
* *
* {@example core/di/ts/contentChildren/content_children_howto.ts region='HowTo'} * {@example core/di/ts/contentChildren/content_children_howto.ts region='HowTo'}
* *
@ -205,7 +205,7 @@ export interface ContentChildDecorator {
/** /**
* @whatItDoes Configures a content query. * @whatItDoes Configures a content query.
* *
* @howToUse * @usageNotes
* *
* {@example core/di/ts/contentChild/content_child_howto.ts region='HowTo'} * {@example core/di/ts/contentChild/content_child_howto.ts region='HowTo'}
* *
@ -266,7 +266,7 @@ export interface ViewChildrenDecorator {
/** /**
* @whatItDoes Configures a view query. * @whatItDoes Configures a view query.
* *
* @howToUse * @usageNotes
* *
* {@example core/di/ts/viewChildren/view_children_howto.ts region='HowTo'} * {@example core/di/ts/viewChildren/view_children_howto.ts region='HowTo'}
* *
@ -325,7 +325,7 @@ export interface ViewChildDecorator {
/** /**
* @whatItDoes Configures a view query. * @whatItDoes Configures a view query.
* *
* @howToUse * @usageNotes
* *
* {@example core/di/ts/viewChild/view_child_howto.ts region='HowTo'} * {@example core/di/ts/viewChild/view_child_howto.ts region='HowTo'}
* *

View File

@ -24,7 +24,7 @@ export interface DirectiveDecorator {
* @whatItDoes Marks a class as an Angular directive and collects directive configuration * @whatItDoes Marks a class as an Angular directive and collects directive configuration
* metadata. * metadata.
* *
* @howToUse * @usageNotes
* *
* ``` * ```
* import {Directive} from '@angular/core'; * import {Directive} from '@angular/core';
@ -413,7 +413,7 @@ export interface ComponentDecorator {
* @whatItDoes Marks a class as an Angular component and collects component configuration * @whatItDoes Marks a class as an Angular component and collects component configuration
* metadata. * metadata.
* *
* @howToUse * @usageNotes
* *
* {@example core/ts/metadata/metadata.ts region='component'} * {@example core/ts/metadata/metadata.ts region='component'}
* *

View File

@ -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. * @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'} * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='OnChanges'}
* *
* @description * @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 * @whatItDoes Lifecycle hook that is called after data-bound properties of a directive are
* initialized. * initialized.
* @howToUse * @usageNotes
* {@example core/ts/metadata/lifecycle_hooks_spec.ts region='OnInit'} * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='OnInit'}
* *
* @description * @description
@ -51,7 +51,7 @@ export interface OnInit { ngOnInit(): void; }
/** /**
* @whatItDoes Lifecycle hook that is called when Angular dirty checks a directive. * @whatItDoes Lifecycle hook that is called when Angular dirty checks a directive.
* @howToUse * @usageNotes
* {@example core/ts/metadata/lifecycle_hooks_spec.ts region='DoCheck'} * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='DoCheck'}
* *
* @description * @description
@ -74,7 +74,7 @@ export interface DoCheck { ngDoCheck(): void; }
/** /**
* @whatItDoes Lifecycle hook that is called when a directive, pipe or service is destroyed. * @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'} * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='OnDestroy'}
* *
* @description * @description
@ -91,7 +91,7 @@ export interface OnDestroy { ngOnDestroy(): void; }
* *
* @whatItDoes Lifecycle hook that is called after a directive's content has been fully * @whatItDoes Lifecycle hook that is called after a directive's content has been fully
* initialized. * initialized.
* @howToUse * @usageNotes
* {@example core/ts/metadata/lifecycle_hooks_spec.ts region='AfterContentInit'} * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='AfterContentInit'}
* *
* @description * @description
@ -103,7 +103,7 @@ export interface AfterContentInit { ngAfterContentInit(): void; }
/** /**
* @whatItDoes Lifecycle hook that is called after every check of a directive's content. * @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'} * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='AfterContentChecked'}
* *
* @description * @description
@ -116,7 +116,7 @@ export interface AfterContentChecked { ngAfterContentChecked(): void; }
/** /**
* @whatItDoes Lifecycle hook that is called after a component's view has been fully * @whatItDoes Lifecycle hook that is called after a component's view has been fully
* initialized. * initialized.
* @howToUse * @usageNotes
* {@example core/ts/metadata/lifecycle_hooks_spec.ts region='AfterViewInit'} * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='AfterViewInit'}
* *
* @description * @description
@ -128,7 +128,7 @@ export interface AfterViewInit { ngAfterViewInit(): void; }
/** /**
* @whatItDoes Lifecycle hook that is called after every check of a component's view. * @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'} * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='AfterViewChecked'}
* *
* @description * @description