@angular/core 8.1.0 → 8.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/bundles/core-testing.umd.js +1 -1
  2. package/bundles/core-testing.umd.min.js +1 -1
  3. package/bundles/core-testing.umd.min.js.map +1 -1
  4. package/bundles/core.umd.js +19 -13
  5. package/bundles/core.umd.js.map +1 -1
  6. package/bundles/core.umd.min.js +2 -2
  7. package/bundles/core.umd.min.js.map +1 -1
  8. package/core.d.ts +175 -199
  9. package/core.metadata.json +1 -1
  10. package/esm2015/src/change_detection/pipe_transform.js +4 -6
  11. package/esm2015/src/di/index.js +1 -1
  12. package/esm2015/src/di/injectable.js +1 -1
  13. package/esm2015/src/di/interface/provider.js +1 -1
  14. package/esm2015/src/di/metadata.js +1 -1
  15. package/esm2015/src/event_emitter.js +3 -10
  16. package/esm2015/src/linker/component_factory.js +9 -3
  17. package/esm2015/src/linker/component_factory_resolver.js +9 -2
  18. package/esm2015/src/metadata/di.js +1 -1
  19. package/esm2015/src/metadata/directives.js +4 -3
  20. package/esm2015/src/util/decorators.js +1 -1
  21. package/esm2015/src/version.js +1 -1
  22. package/esm5/src/change_detection/pipe_transform.js +1 -1
  23. package/esm5/src/di/index.js +1 -1
  24. package/esm5/src/di/injectable.js +1 -1
  25. package/esm5/src/di/interface/provider.js +1 -1
  26. package/esm5/src/di/metadata.js +1 -1
  27. package/esm5/src/event_emitter.js +3 -10
  28. package/esm5/src/linker/component_factory.js +7 -1
  29. package/esm5/src/linker/component_factory_resolver.js +7 -1
  30. package/esm5/src/metadata/di.js +1 -1
  31. package/esm5/src/metadata/directives.js +4 -3
  32. package/esm5/src/util/decorators.js +1 -1
  33. package/esm5/src/version.js +1 -1
  34. package/fesm2015/core.js +19 -13
  35. package/fesm2015/core.js.map +1 -1
  36. package/fesm2015/testing.js +1 -1
  37. package/fesm5/core.js +19 -13
  38. package/fesm5/core.js.map +1 -1
  39. package/fesm5/testing.js +1 -1
  40. package/package.json +1 -1
  41. package/src/r3_symbols.d.ts +64 -79
  42. package/testing/testing.d.ts +1 -1
  43. package/testing.d.ts +1 -1
package/core.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v8.1.0
2
+ * @license Angular v8.1.1
3
3
  * (c) 2010-2019 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -434,7 +434,7 @@ export declare const Attribute: AttributeDecorator;
434
434
  */
435
435
  export declare interface AttributeDecorator {
436
436
  /**
437
- * A parameter decorator for a directive constructor that designates
437
+ * Parameter decorator for a directive constructor that designates
438
438
  * a host-element attribute whose value is injected as a constant string literal.
439
439
  *
440
440
  * @usageNotes
@@ -447,11 +447,11 @@ export declare interface AttributeDecorator {
447
447
  *
448
448
  * The following example uses the decorator to inject the string literal `text`.
449
449
  *
450
- * {@example core/ts/metadata/metadata.ts region='attributeMetadata'}
450
+ * {@example core/ts/metadata/metadata.ts region='attributeMetadata' linenums="false"}
451
451
  *
452
452
  * ### Example as TypeScript Decorator
453
453
  *
454
- * {@example core/ts/metadata/metadata.ts region='attributeFactory'}
454
+ * {@example core/ts/metadata/metadata.ts region='attributeFactory' linenums="false"}
455
455
  *
456
456
  */
457
457
  (name: string): any;
@@ -630,22 +630,19 @@ declare const CHILD_TAIL = 15;
630
630
 
631
631
  /**
632
632
  * Configures the `Injector` to return an instance of `useClass` for a token.
633
- *
634
- * For more details, see the ["Dependency Injection Guide"](guide/dependency-injection).
633
+ * @see ["Dependency Injection Guide"](guide/dependency-injection).
635
634
  *
636
635
  * @usageNotes
637
636
  *
638
- * ### Example
639
- *
640
- * {@example core/di/ts/provider_spec.ts region='ClassProvider'}
637
+ * {@example core/di/ts/provider_spec.ts region='ClassProvider' linenums="false"}
641
638
  *
642
639
  * Note that following two providers are not equal:
643
640
  *
644
- * {@example core/di/ts/provider_spec.ts region='ClassProviderDifference'}
641
+ * {@example core/di/ts/provider_spec.ts region='ClassProviderDifference' linenums="false"}
645
642
  *
646
643
  * ### Multi-value example
647
644
  *
648
- * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
645
+ * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect' linenums="false"}
649
646
  *
650
647
  * @publicApi
651
648
  */
@@ -655,7 +652,7 @@ export declare interface ClassProvider extends ClassSansProvider {
655
652
  */
656
653
  provide: any;
657
654
  /**
658
- * If true, then injector returns an array of instances. This is useful to allow multiple
655
+ * When true, injector returns an array of instances. This is useful to allow multiple
659
656
  * providers spread across many files to provide configuration information to a common token.
660
657
  */
661
658
  multi?: boolean;
@@ -665,7 +662,7 @@ export declare interface ClassProvider extends ClassSansProvider {
665
662
  * Configures the `Injector` to return a value by invoking a `useClass` function.
666
663
  * Base for `ClassProvider` decorator.
667
664
  *
668
- * For more details, see the ["Dependency Injection Guide"](guide/dependency-injection).
665
+ * @see ["Dependency Injection Guide"](guide/dependency-injection).
669
666
  *
670
667
  * @publicApi
671
668
  */
@@ -910,7 +907,8 @@ export declare interface ComponentDecorator {
910
907
  * The following example creates a component with two data-bound properties,
911
908
  * specified by the `inputs` value.
912
909
  *
913
- * <code-example path="core/ts/metadata/directives.ts" region="component-input">
910
+ * <code-example path="core/ts/metadata/directives.ts" region="component-input"
911
+ * linenums="false">
914
912
  * </code-example>
915
913
  *
916
914
  *
@@ -919,14 +917,15 @@ export declare interface ComponentDecorator {
919
917
  * The following example shows two event emitters that emit on an interval. One
920
918
  * emits an output every second, while the other emits every five seconds.
921
919
  *
922
- * {@example core/ts/metadata/directives.ts region='component-output-interval'}
920
+ * {@example core/ts/metadata/directives.ts region='component-output-interval
921
+ * linenums="false"}
923
922
  *
924
923
  * ### Injecting a class with a view provider
925
924
  *
926
925
  * The following simple example injects a class into a component
927
926
  * using the view provider specified in component metadata:
928
927
  *
929
- * ```
928
+ * ```ts
930
929
  * class Greeter {
931
930
  * greet(name:string) {
932
931
  * return 'Hello ' + name + '!';
@@ -967,13 +966,13 @@ export declare interface ComponentDecorator {
967
966
  * * Trims all whitespaces at the beginning and the end of a template.
968
967
  * * Removes whitespace-only text nodes. For example,
969
968
  *
970
- * ```
969
+ * ```html
971
970
  * <button>Action 1</button> <button>Action 2</button>
972
971
  * ```
973
972
  *
974
973
  * becomes:
975
974
  *
976
- * ```
975
+ * ```html
977
976
  * <button>Action 1</button><button>Action 2</button>
978
977
  * ```
979
978
  *
@@ -1041,6 +1040,12 @@ declare interface ComponentDefFeature {
1041
1040
  }
1042
1041
 
1043
1042
  /**
1043
+ * Base class for a factory that can create a component dynamically.
1044
+ * Instantiate a factory for a given type of component with `resolveComponentFactory()`.
1045
+ * Use the resulting `ComponentFactory.create()` method to create a component of that type.
1046
+ *
1047
+ * @see [Dynamic Components](guide/dynamic-component-loader)
1048
+ *
1044
1049
  * @publicApi
1045
1050
  */
1046
1051
  declare abstract class ComponentFactory<C> {
@@ -1049,7 +1054,7 @@ declare abstract class ComponentFactory<C> {
1049
1054
  */
1050
1055
  abstract readonly selector: string;
1051
1056
  /**
1052
- * The component's type
1057
+ * The type of component the factory will create.
1053
1058
  */
1054
1059
  abstract readonly componentType: Type<any>;
1055
1060
  /**
@@ -1079,10 +1084,20 @@ export { ComponentFactory }
1079
1084
  export { ComponentFactory as ɵComponentFactory }
1080
1085
 
1081
1086
  /**
1087
+ * A simple registry that maps `Components` to generated `ComponentFactory` classes
1088
+ * that can be used to create instances of components.
1089
+ * Use to obtain the factory for a given component type,
1090
+ * then use the factory's `create()` method to create a component of that type.
1091
+ *
1092
+ * @see [Dynamic Components](guide/dynamic-component-loader)
1082
1093
  * @publicApi
1083
1094
  */
1084
1095
  export declare abstract class ComponentFactoryResolver {
1085
1096
  static NULL: ComponentFactoryResolver;
1097
+ /**
1098
+ * Retrieves the factory object that creates a component of the given type.
1099
+ * @param component The component type.
1100
+ */
1086
1101
  abstract resolveComponentFactory<T>(component: Type<T>): ComponentFactory<T>;
1087
1102
  }
1088
1103
 
@@ -1118,7 +1133,7 @@ export declare abstract class ComponentRef<C> {
1118
1133
  */
1119
1134
  abstract readonly changeDetectorRef: ChangeDetectorRef;
1120
1135
  /**
1121
- * The component type.
1136
+ * The type of this component (as created by a `ComponentFactory` class).
1122
1137
  */
1123
1138
  abstract readonly componentType: Type<any>;
1124
1139
  /**
@@ -1144,27 +1159,25 @@ declare type ComponentTemplate<T> = {
1144
1159
  /**
1145
1160
  * Configures the `Injector` to return an instance of a token.
1146
1161
  *
1147
- * For more details, see the ["Dependency Injection Guide"](guide/dependency-injection).
1162
+ * @see ["Dependency Injection Guide"](guide/dependency-injection).
1148
1163
  *
1149
1164
  * @usageNotes
1150
1165
  *
1151
- * ### Example
1152
- *
1153
- * {@example core/di/ts/provider_spec.ts region='ConstructorProvider'}
1166
+ * {@example core/di/ts/provider_spec.ts region='ConstructorProvider' linenums="false"}
1154
1167
  *
1155
1168
  * ### Multi-value example
1156
1169
  *
1157
- * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
1170
+ * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect' linenums="false"}
1158
1171
  *
1159
1172
  * @publicApi
1160
1173
  */
1161
- declare interface ConstructorProvider extends ConstructorSansProvider {
1174
+ export declare interface ConstructorProvider extends ConstructorSansProvider {
1162
1175
  /**
1163
- * An injection token. (Typically an instance of `Type` or `InjectionToken`, but can be `any`).
1176
+ * An injection token. Typically an instance of `Type` or `InjectionToken`, but can be `any`.
1164
1177
  */
1165
1178
  provide: Type<any>;
1166
1179
  /**
1167
- * If true, then injector returns an array of instances. This is useful to allow multiple
1180
+ * When true, injector returns an array of instances. This is useful to allow multiple
1168
1181
  * providers spread across many files to provide configuration information to a common token.
1169
1182
  */
1170
1183
  multi?: boolean;
@@ -1173,13 +1186,11 @@ declare interface ConstructorProvider extends ConstructorSansProvider {
1173
1186
  /**
1174
1187
  * Configures the `Injector` to return an instance of a token.
1175
1188
  *
1176
- * For more details, see the ["Dependency Injection Guide"](guide/dependency-injection).
1189
+ * @see ["Dependency Injection Guide"](guide/dependency-injection).
1177
1190
  *
1178
1191
  * @usageNotes
1179
1192
  *
1180
- * ### Example
1181
- *
1182
- * ```
1193
+ * ```ts
1183
1194
  * @Injectable(SomeModule, {deps: []})
1184
1195
  * class MyService {}
1185
1196
  * ```
@@ -1188,8 +1199,7 @@ declare interface ConstructorProvider extends ConstructorSansProvider {
1188
1199
  */
1189
1200
  export declare interface ConstructorSansProvider {
1190
1201
  /**
1191
- * A list of `token`s which need to be resolved by the injector. The list of values is then
1192
- * used as arguments to the `useClass` constructor.
1202
+ * A list of `token`s to be resolved by the injector.
1193
1203
  */
1194
1204
  deps?: any[];
1195
1205
  }
@@ -1220,33 +1230,35 @@ export declare const ContentChild: ContentChildDecorator;
1220
1230
  */
1221
1231
  export declare interface ContentChildDecorator {
1222
1232
  /**
1223
- * Configures a content query.
1233
+ * Parameter decorator that configures a content query.
1224
1234
  *
1225
- * You can use ContentChild to get the first element or the directive matching the selector from
1226
- * the content DOM. If the content DOM changes, and a new child matches the selector,
1235
+ * Use to get the first element or the directive matching the selector from the content DOM.
1236
+ * If the content DOM changes, and a new child matches the selector,
1227
1237
  * the property will be updated.
1228
1238
  *
1229
1239
  * Content queries are set before the `ngAfterContentInit` callback is called.
1230
1240
  *
1231
1241
  * **Metadata Properties**:
1232
1242
  *
1233
- * * **selector** - the directive type or the name used for querying.
1234
- * * **read** - read a different token from the queried element.
1235
- * * **static** - whether or not to resolve query results before change detection runs (i.e.
1236
- * return static results only). If this option is not provided, the compiler will fall back
1237
- * to its default behavior, which is to use query results to determine the timing of query
1238
- * resolution. If any query results are inside a nested view (e.g. *ngIf), the query will be
1239
- * resolved after change detection runs. Otherwise, it will be resolved before change detection
1243
+ * * **selector** - The directive type or the name used for querying.
1244
+ * * **read** - True to read a different token from the queried element.
1245
+ * * **static** - True to resolve query results before change detection runs,
1246
+ * false to resolve after change detection.
1247
+ *
1248
+ * When `static` is not provided, uses the query results to determine the timing of query
1249
+ * resolution. If any query results are inside a nested view (such as `*ngIf`), the query is
1250
+ * resolved after change detection runs. Otherwise, it is resolved before change detection
1240
1251
  * runs.
1241
1252
  *
1242
1253
  * @usageNotes
1243
- * ### Example
1244
1254
  *
1245
- * {@example core/di/ts/contentChild/content_child_howto.ts region='HowTo'}
1255
+ * {@example core/di/ts/contentChild/content_child_howto.ts region='HowTo'
1256
+ * linenums="false"}
1246
1257
  *
1247
1258
  * ### Example
1248
1259
  *
1249
- * {@example core/di/ts/contentChild/content_child_example.ts region='Component'}
1260
+ * {@example core/di/ts/contentChild/content_child_example.ts region='Component'
1261
+ * linenums="false"}
1250
1262
  *
1251
1263
  * @Annotation
1252
1264
  */
@@ -1286,33 +1298,34 @@ export declare const ContentChildren: ContentChildrenDecorator;
1286
1298
  */
1287
1299
  export declare interface ContentChildrenDecorator {
1288
1300
  /**
1289
- * Configures a content query.
1301
+ * Parameter decorator that configures a content query.
1290
1302
  *
1291
- * You can use ContentChildren to get the `QueryList` of elements or directives from the
1292
- * content DOM. Any time a child element is added, removed, or moved, the query list will be
1303
+ * Use to get the `QueryList` of elements or directives from the content DOM.
1304
+ * Any time a child element is added, removed, or moved, the query list will be
1293
1305
  * updated, and the changes observable of the query list will emit a new value.
1294
1306
  *
1295
1307
  * Content queries are set before the `ngAfterContentInit` callback is called.
1296
1308
  *
1297
1309
  * **Metadata Properties**:
1298
1310
  *
1299
- * * **selector** - the directive type or the name used for querying.
1300
- * * **descendants** - include only direct children or all descendants.
1301
- * * **read** - read a different token from the queried elements.
1311
+ * * **selector** - The directive type or the name used for querying.
1312
+ * * **descendants** - True to include all descendants, otherwise include only direct children.
1313
+ * * **read** - True to read a different token from the queried elements.
1302
1314
  *
1303
1315
  * @usageNotes
1304
- * ### Basic Example
1305
1316
  *
1306
1317
  * Here is a simple demonstration of how the `ContentChildren` decorator can be used.
1307
1318
  *
1308
- * {@example core/di/ts/contentChildren/content_children_howto.ts region='HowTo'}
1319
+ * {@example core/di/ts/contentChildren/content_children_howto.ts region='HowTo'
1320
+ * linenums="false"}
1309
1321
  *
1310
- * ### Tab-pane Example
1322
+ * ### Tab-pane example
1311
1323
  *
1312
1324
  * Here is a slightly more realistic example that shows how `ContentChildren` decorators
1313
1325
  * can be used to implement a tab pane component.
1314
1326
  *
1315
- * {@example core/di/ts/contentChildren/content_children_example.ts region='Component'}
1327
+ * {@example core/di/ts/contentChildren/content_children_example.ts region='Component'
1328
+ * linenums="false"}
1316
1329
  *
1317
1330
  * @Annotation
1318
1331
  */
@@ -1666,9 +1679,8 @@ export declare interface Directive {
1666
1679
  * - `bindingProperty` specifies the DOM property where the value is read from.
1667
1680
  *
1668
1681
  * When `bindingProperty` is not provided, it is assumed to be equal to `directiveProperty`.
1669
- * @usageNotes
1670
1682
  *
1671
- * ### Example
1683
+ * @usageNotes
1672
1684
  *
1673
1685
  * The following example creates a component with two data-bound properties.
1674
1686
  *
@@ -1703,8 +1715,6 @@ export declare interface Directive {
1703
1715
  *
1704
1716
  * @usageNotes
1705
1717
  *
1706
- * ### Example
1707
- *
1708
1718
  * ```typescript
1709
1719
  * @Component({
1710
1720
  * selector: 'child-dir',
@@ -1743,9 +1753,7 @@ export declare interface Directive {
1743
1753
  *
1744
1754
  * @usageNotes
1745
1755
  *
1746
- * ### Simple Example
1747
- *
1748
- * ```
1756
+ * ```ts
1749
1757
  * @Directive({
1750
1758
  * selector: 'child-dir',
1751
1759
  * exportAs: 'child'
@@ -1771,12 +1779,10 @@ export declare interface Directive {
1771
1779
  *
1772
1780
  * @usageNotes
1773
1781
  *
1774
- * ### Example
1775
- *
1776
1782
  * The following example shows how queries are defined
1777
1783
  * and when their results are available in lifecycle hooks:
1778
1784
  *
1779
- * ```
1785
+ * ```ts
1780
1786
  * @Component({
1781
1787
  * selector: 'someDir',
1782
1788
  * queries: {
@@ -1851,8 +1857,9 @@ export declare const Directive: DirectiveDecorator;
1851
1857
  */
1852
1858
  export declare interface DirectiveDecorator {
1853
1859
  /**
1854
- * Marks a class as an Angular directive. You can define your own
1855
- * directives to attach custom behavior to elements in the DOM.
1860
+ * Decorator that marks a class as an Angular directive.
1861
+ * You can define your own directives to attach custom behavior to elements in the DOM.
1862
+ *
1856
1863
  * The options provide configuration metadata that determines
1857
1864
  * how the directive should be processed, instantiated and used at
1858
1865
  * runtime.
@@ -1864,7 +1871,7 @@ export declare interface DirectiveDecorator {
1864
1871
  * @usageNotes
1865
1872
  * To define a directive, mark the class with the decorator and provide metadata.
1866
1873
  *
1867
- * ```
1874
+ * ```ts
1868
1875
  * import {Directive} from '@angular/core';
1869
1876
  *
1870
1877
  * @Directive({
@@ -1885,7 +1892,7 @@ export declare interface DirectiveDecorator {
1885
1892
  * a directive imported from another module.
1886
1893
  * List the directive class in the `declarations` field of an NgModule.
1887
1894
  *
1888
- * ```
1895
+ * ```ts
1889
1896
  * declarations: [
1890
1897
  * AppComponent,
1891
1898
  * MyDirective
@@ -2231,7 +2238,7 @@ export declare class ErrorHandler {
2231
2238
  * that create event emitters. When the title is clicked, the emitter
2232
2239
  * emits an open or close event to toggle the current visibility state.
2233
2240
  *
2234
- * ```
2241
+ * ```html
2235
2242
  * @Component({
2236
2243
  * selector: 'zippy',
2237
2244
  * template: `
@@ -2260,17 +2267,10 @@ export declare class ErrorHandler {
2260
2267
  * Access the event object with the `$event` argument passed to the output event
2261
2268
  * handler:
2262
2269
  *
2263
- * ```
2270
+ * ```html
2264
2271
  * <zippy (open)="onOpen($event)" (close)="onClose($event)"></zippy>
2265
2272
  * ```
2266
2273
  *
2267
- * ### Notes
2268
- *
2269
- * Uses Rx.Observable but provides an adapter to make it work as specified here:
2270
- * https://github.com/jhusain/observable-spec
2271
- *
2272
- * Once a reference implementation of the spec is available, switch to it.
2273
- *
2274
2274
  * @publicApi
2275
2275
  */
2276
2276
  export declare class EventEmitter<T> extends Subject<T> {
@@ -2305,27 +2305,25 @@ export declare class EventEmitter<T> extends Subject<T> {
2305
2305
  /**
2306
2306
  * Configures the `Injector` to return a value of another `useExisting` token.
2307
2307
  *
2308
- * For more details, see the ["Dependency Injection Guide"](guide/dependency-injection).
2308
+ * @see ["Dependency Injection Guide"](guide/dependency-injection).
2309
2309
  *
2310
2310
  * @usageNotes
2311
2311
  *
2312
- * ### Example
2313
- *
2314
- * {@example core/di/ts/provider_spec.ts region='ExistingProvider'}
2312
+ * {@example core/di/ts/provider_spec.ts region='ExistingProvider' linenums="false"}
2315
2313
  *
2316
2314
  * ### Multi-value example
2317
2315
  *
2318
- * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
2316
+ * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect' linenums="false"}
2319
2317
  *
2320
2318
  * @publicApi
2321
2319
  */
2322
2320
  export declare interface ExistingProvider extends ExistingSansProvider {
2323
2321
  /**
2324
- * An injection token. (Typically an instance of `Type` or `InjectionToken`, but can be `any`).
2322
+ * An injection token. Typically an instance of `Type` or `InjectionToken`, but can be `any`.
2325
2323
  */
2326
2324
  provide: any;
2327
2325
  /**
2328
- * If true, then injector returns an array of instances. This is useful to allow multiple
2326
+ * When true, injector returns an array of instances. This is useful to allow multiple
2329
2327
  * providers spread across many files to provide configuration information to a common token.
2330
2328
  */
2331
2329
  multi?: boolean;
@@ -2334,19 +2332,14 @@ export declare interface ExistingProvider extends ExistingSansProvider {
2334
2332
  /**
2335
2333
  * Configures the `Injector` to return a value of another `useExisting` token.
2336
2334
  *
2337
- * For more details, see the ["Dependency Injection Guide"](guide/dependency-injection).
2338
- *
2339
- * @usageNotes
2340
- *
2341
- * ### Example
2342
- *
2343
- * {@example core/di/ts/provider_spec.ts region='ExistingSansProvider'}
2335
+ * @see `ExistingProvider`
2336
+ * @see ["Dependency Injection Guide"](guide/dependency-injection).
2344
2337
  *
2345
2338
  * @publicApi
2346
2339
  */
2347
- declare interface ExistingSansProvider {
2340
+ export declare interface ExistingSansProvider {
2348
2341
  /**
2349
- * Existing `token` to return. (equivalent to `injector.get(useExisting)`)
2342
+ * Existing `token` to return. (Equivalent to `injector.get(useExisting)`)
2350
2343
  */
2351
2344
  useExisting: any;
2352
2345
  }
@@ -2376,22 +2369,19 @@ declare type FactoryFn<T> = {
2376
2369
 
2377
2370
  /**
2378
2371
  * Configures the `Injector` to return a value by invoking a `useFactory` function.
2379
- *
2380
- * For more details, see the ["Dependency Injection Guide"](guide/dependency-injection).
2372
+ * @see ["Dependency Injection Guide"](guide/dependency-injection).
2381
2373
  *
2382
2374
  * @usageNotes
2383
2375
  *
2384
- * ### Example
2385
- *
2386
- * {@example core/di/ts/provider_spec.ts region='FactoryProvider'}
2376
+ * {@example core/di/ts/provider_spec.ts region='FactoryProvider' linenums="false"}
2387
2377
  *
2388
2378
  * Dependencies can also be marked as optional:
2389
2379
  *
2390
- * {@example core/di/ts/provider_spec.ts region='FactoryProviderOptionalDeps'}
2380
+ * {@example core/di/ts/provider_spec.ts region='FactoryProviderOptionalDeps' linenums="false"}
2391
2381
  *
2392
2382
  * ### Multi-value example
2393
2383
  *
2394
- * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
2384
+ * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect' linenums="false"}
2395
2385
  *
2396
2386
  * @publicApi
2397
2387
  */
@@ -2401,7 +2391,7 @@ export declare interface FactoryProvider extends FactorySansProvider {
2401
2391
  */
2402
2392
  provide: any;
2403
2393
  /**
2404
- * If true, then injector returns an array of instances. This is useful to allow multiple
2394
+ * When true, injector returns an array of instances. This is useful to allow multiple
2405
2395
  * providers spread across many files to provide configuration information to a common token.
2406
2396
  */
2407
2397
  multi?: boolean;
@@ -2410,23 +2400,19 @@ export declare interface FactoryProvider extends FactorySansProvider {
2410
2400
  /**
2411
2401
  * Configures the `Injector` to return a value by invoking a `useFactory` function.
2412
2402
  *
2413
- * For more details, see the ["Dependency Injection Guide"](guide/dependency-injection).
2414
- *
2415
- * @usageNotes
2416
- * ### Example
2417
- *
2418
- * {@example core/di/ts/provider_spec.ts region='FactorySansProvider'}
2403
+ * @see `FactoryProvider`
2404
+ * @see ["Dependency Injection Guide"](guide/dependency-injection).
2419
2405
  *
2420
2406
  * @publicApi
2421
2407
  */
2422
- declare interface FactorySansProvider {
2408
+ export declare interface FactorySansProvider {
2423
2409
  /**
2424
2410
  * A function to invoke to create a value for this `token`. The function is invoked with
2425
2411
  * resolved values of `token`s in the `deps` field.
2426
2412
  */
2427
2413
  useFactory: Function;
2428
2414
  /**
2429
- * A list of `token`s which need to be resolved by the injector. The list of values is then
2415
+ * A list of `token`s to be resolved by the injector. The list of values is then
2430
2416
  * used as arguments to the `useFactory` function.
2431
2417
  */
2432
2418
  deps?: any[];
@@ -2597,7 +2583,7 @@ declare type HostBindingsFunction<T> = <U extends T>(rf: ɵRenderFlags, ctx: U,
2597
2583
  */
2598
2584
  export declare interface HostDecorator {
2599
2585
  /**
2600
- * A parameter decorator on a view-provider parameter of a class constructor
2586
+ * Parameter decorator on a view-provider parameter of a class constructor
2601
2587
  * that tells the DI framework to resolve the view by checking injectors of child
2602
2588
  * elements, and stop when reaching the host element of the current component.
2603
2589
  *
@@ -2608,7 +2594,8 @@ export declare interface HostDecorator {
2608
2594
  *
2609
2595
  * The following shows use with the `@Optional` decorator, and allows for a null result.
2610
2596
  *
2611
- * <code-example path="core/di/ts/metadata_spec.ts" region="Host"></code-example>
2597
+ * <code-example path="core/di/ts/metadata_spec.ts" region="Host"
2598
+ * linenums="false"></code-example>
2612
2599
  */
2613
2600
  (): any;
2614
2601
  new (): Host;
@@ -2684,9 +2671,10 @@ export declare interface HostListener {
2684
2671
  }
2685
2672
 
2686
2673
  /**
2687
- * Binds a DOM event to a host listener and supplies configuration metadata.
2674
+ * Decorator that binds a DOM event to a host listener and supplies configuration metadata.
2688
2675
  * Angular invokes the supplied handler method when the host element emits the specified event,
2689
2676
  * and updates the bound element with the result.
2677
+ *
2690
2678
  * If the handler method returns false, applies `preventDefault` on the bound element.
2691
2679
  *
2692
2680
  * @usageNotes
@@ -2694,7 +2682,7 @@ export declare interface HostListener {
2694
2682
  * The following example declares a directive
2695
2683
  * that attaches a click listener to a button and counts clicks.
2696
2684
  *
2697
- * ```
2685
+ * ```ts
2698
2686
  * @Directive({selector: 'button[counting]'})
2699
2687
  * class CountClicks {
2700
2688
  * numberOfClicks = 0;
@@ -3160,7 +3148,7 @@ export declare const Injectable: InjectableDecorator;
3160
3148
  */
3161
3149
  export declare interface InjectableDecorator {
3162
3150
  /**
3163
- * Marks a class as available to `Injector` for creation.
3151
+ * Decorator that marks a class as available to `Injector` for creation.
3164
3152
  *
3165
3153
  * @see [Introduction to Services and DI](guide/architecture-services)
3166
3154
  * @see [Dependency Injection Guide](guide/dependency-injection)
@@ -3170,7 +3158,8 @@ export declare interface InjectableDecorator {
3170
3158
  * The following example shows how service classes are properly marked as
3171
3159
  * injectable.
3172
3160
  *
3173
- * <code-example path="core/di/ts/metadata_spec.ts" region="Injectable"></code-example>
3161
+ * <code-example path="core/di/ts/metadata_spec.ts" region="Injectable"
3162
+ * linenums="false"></code-example>
3174
3163
  *
3175
3164
  */
3176
3165
  (): TypeDecorator;
@@ -3216,7 +3205,7 @@ declare function injectChangeDetectorRef(): ChangeDetectorRef;
3216
3205
  */
3217
3206
  export declare interface InjectDecorator {
3218
3207
  /**
3219
- * A parameter decorator on a dependency parameter of a class constructor
3208
+ * Parameter decorator on a dependency parameter of a class constructor
3220
3209
  * that specifies a custom provider of the dependency.
3221
3210
  *
3222
3211
  * Learn more in the ["Dependency Injection Guide"](guide/dependency-injection).
@@ -3229,7 +3218,7 @@ export declare interface InjectDecorator {
3229
3218
  * parameter as the provider.
3230
3219
  *
3231
3220
  * <code-example path="core/di/ts/metadata_spec.ts"
3232
- * region="InjectWithoutDecorator"></code-example>
3221
+ * region="InjectWithoutDecorator" linenums="false"></code-example>
3233
3222
  */
3234
3223
  (token: any): any;
3235
3224
  new (token: any): Inject;
@@ -4818,7 +4807,7 @@ export declare const Optional: OptionalDecorator;
4818
4807
  */
4819
4808
  export declare interface OptionalDecorator {
4820
4809
  /**
4821
- * A parameter decorator to be used on constructor parameters,
4810
+ * Parameter decorator to be used on constructor parameters,
4822
4811
  * which marks the parameter as being an optional dependency.
4823
4812
  * The DI framework provides null if the dependency is not found.
4824
4813
  *
@@ -4831,7 +4820,8 @@ export declare interface OptionalDecorator {
4831
4820
  *
4832
4821
  * The following code allows the possibility of a null result:
4833
4822
  *
4834
- * <code-example path="core/di/ts/metadata_spec.ts" region="Optional"></code-example>
4823
+ * <code-example path="core/di/ts/metadata_spec.ts" region="Optional"
4824
+ * linenums="false"></code-example>
4835
4825
  *
4836
4826
  */
4837
4827
  (): any;
@@ -4973,17 +4963,15 @@ declare type PipeDefListOrFactory = (() => PipeDefList) | PipeDefList;
4973
4963
 
4974
4964
 
4975
4965
  /**
4976
- * To create a Pipe, you must implement this interface.
4977
- *
4966
+ * An interface that is implemented by pipes in order to perform a transformation.
4978
4967
  * Angular invokes the `transform` method with the value of a binding
4979
4968
  * as the first argument, and any parameters as the second argument in list form.
4980
4969
  *
4981
4970
  * @usageNotes
4982
- * ### Example
4983
4971
  *
4984
- * The `RepeatPipe` below repeats the value as many times as indicated by the first argument:
4972
+ * In the following example, `RepeatPipe` repeats a given value a given number of times.
4985
4973
  *
4986
- * ```
4974
+ * ```ts
4987
4975
  * import {Pipe, PipeTransform} from '@angular/core';
4988
4976
  *
4989
4977
  * @Pipe({name: 'repeat'})
@@ -5213,7 +5201,7 @@ declare interface ProceduralRenderer3 {
5213
5201
  }
5214
5202
 
5215
5203
  /**
5216
- * Describes a function that is used to process provider list (for example in case of provider
5204
+ * Describes a function that is used to process provider lists (such as provider
5217
5205
  * overrides).
5218
5206
  */
5219
5207
  declare type ProcessProvidersFunction = (providers: Provider[]) => Provider[];
@@ -5255,11 +5243,8 @@ declare type PropertyAliasValue = (number | string)[];
5255
5243
 
5256
5244
  /**
5257
5245
  * Describes how the `Injector` should be configured.
5246
+ * @see ["Dependency Injection Guide"](guide/dependency-injection).
5258
5247
  *
5259
- * For more details, see the ["Dependency Injection Guide"](guide/dependency-injection).
5260
- *
5261
- * @see `TypeProvider`
5262
- * @see `ClassProvider`
5263
5248
  * @see `StaticProvider`
5264
5249
  *
5265
5250
  * @publicApi
@@ -6352,7 +6337,7 @@ export declare const Self: SelfDecorator;
6352
6337
  */
6353
6338
  export declare interface SelfDecorator {
6354
6339
  /**
6355
- * A parameter decorator to be used on constructor parameters,
6340
+ * Parameter decorator to be used on constructor parameters,
6356
6341
  * which tells the DI framework to start dependency resolution from the local injector.
6357
6342
  *
6358
6343
  * Resolution works upward through the injector hierarchy, so the children
@@ -6364,7 +6349,8 @@ export declare interface SelfDecorator {
6364
6349
  * by the local injector when instantiating the class itself, but not
6365
6350
  * when instantiating a child.
6366
6351
  *
6367
- * <code-example path="core/di/ts/metadata_spec.ts" region="Self"></code-example>
6352
+ * <code-example path="core/di/ts/metadata_spec.ts" region="Self"
6353
+ * linenums="false"></code-example>
6368
6354
  *
6369
6355
  *
6370
6356
  * @see `SkipSelf`
@@ -6476,7 +6462,7 @@ export declare const SkipSelf: SkipSelfDecorator;
6476
6462
  */
6477
6463
  export declare interface SkipSelfDecorator {
6478
6464
  /**
6479
- * A parameter decorator to be used on constructor parameters,
6465
+ * Parameter decorator to be used on constructor parameters,
6480
6466
  * which tells the DI framework to start dependency resolution from the parent injector.
6481
6467
  * Resolution works upward through the injector hierarchy, so the local injector
6482
6468
  * is not checked for a provider.
@@ -6486,7 +6472,8 @@ export declare interface SkipSelfDecorator {
6486
6472
  * In the following example, the dependency can be resolved when
6487
6473
  * instantiating a child, but not when instantiating the class itself.
6488
6474
  *
6489
- * <code-example path="core/di/ts/metadata_spec.ts" region="SkipSelf"></code-example>
6475
+ * <code-example path="core/di/ts/metadata_spec.ts" region="SkipSelf"
6476
+ * linenums="false"></code-example>
6490
6477
  *
6491
6478
  * Learn more in the
6492
6479
  * [Dependency Injection guide](guide/dependency-injection-in-action#skip).
@@ -6501,32 +6488,29 @@ export declare interface SkipSelfDecorator {
6501
6488
 
6502
6489
  /**
6503
6490
  * Configures the `Injector` to return an instance of `useClass` for a token.
6504
- *
6505
- * For more details, see the ["Dependency Injection Guide"](guide/dependency-injection).
6491
+ * @see ["Dependency Injection Guide"](guide/dependency-injection).
6506
6492
  *
6507
6493
  * @usageNotes
6508
6494
  *
6509
- * ### Example
6510
- *
6511
6495
  * {@example core/di/ts/provider_spec.ts region='StaticClassProvider'}
6512
6496
  *
6513
6497
  * Note that following two providers are not equal:
6514
6498
  *
6515
- * {@example core/di/ts/provider_spec.ts region='StaticClassProviderDifference'}
6499
+ * {@example core/di/ts/provider_spec.ts region='StaticClassProviderDifference' linenums="false"}
6516
6500
  *
6517
6501
  * ### Multi-value example
6518
6502
  *
6519
- * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
6503
+ * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect' linenums="false"}
6520
6504
  *
6521
6505
  * @publicApi
6522
6506
  */
6523
- declare interface StaticClassProvider extends StaticClassSansProvider {
6507
+ export declare interface StaticClassProvider extends StaticClassSansProvider {
6524
6508
  /**
6525
- * An injection token. (Typically an instance of `Type` or `InjectionToken`, but can be `any`).
6509
+ * An injection token. Typically an instance of `Type` or `InjectionToken`, but can be `any`.
6526
6510
  */
6527
6511
  provide: any;
6528
6512
  /**
6529
- * If true, then injector returns an array of instances. This is useful to allow multiple
6513
+ * When true, injector returns an array of instances. This is useful to allow multiple
6530
6514
  * providers spread across many files to provide configuration information to a common token.
6531
6515
  */
6532
6516
  multi?: boolean;
@@ -6538,27 +6522,22 @@ declare interface StaticClassProvider extends StaticClassSansProvider {
6538
6522
  *
6539
6523
  * @publicApi
6540
6524
  */
6541
- declare interface StaticClassSansProvider {
6525
+ export declare interface StaticClassSansProvider {
6542
6526
  /**
6543
- * An optional class to instantiate for the `token`. (If not provided `provide` is assumed to be a
6544
- * class to instantiate)
6527
+ * An optional class to instantiate for the `token`. By default, the `provide`
6528
+ * class is instantiated.
6545
6529
  */
6546
6530
  useClass: Type<any>;
6547
6531
  /**
6548
- * A list of `token`s which need to be resolved by the injector. The list of values is then
6532
+ * A list of `token`s to be resolved by the injector. The list of values is then
6549
6533
  * used as arguments to the `useClass` constructor.
6550
6534
  */
6551
6535
  deps: any[];
6552
6536
  }
6553
6537
 
6554
6538
  /**
6555
- * Describes how the `Injector` should be configured in a static way (Without reflection).
6556
- *
6557
- * For more details, see the ["Dependency Injection Guide"](guide/dependency-injection).
6558
- *
6559
- * @see `ValueProvider`
6560
- * @see `ExistingProvider`
6561
- * @see `FactoryProvider`
6539
+ * Describes how the `Injector` should be configured as static (that is, without reflection).
6540
+ * @see ["Dependency Injection Guide"](guide/dependency-injection).
6562
6541
  *
6563
6542
  * @publicApi
6564
6543
  */
@@ -8287,11 +8266,8 @@ export declare interface Type<T> extends Function {
8287
8266
  }
8288
8267
 
8289
8268
  /**
8290
- * An interface implemented by all Angular type decorators, which allows them to be used as ES7
8291
- * decorators as well as
8292
- * Angular DSL syntax.
8293
- *
8294
- * ES7 syntax:
8269
+ * An interface implemented by all Angular type decorators, which allows them to be used as
8270
+ * decorators as well as Angular syntax.
8295
8271
  *
8296
8272
  * ```
8297
8273
  * @ng.Component({...})
@@ -8302,7 +8278,7 @@ export declare interface Type<T> extends Function {
8302
8278
  */
8303
8279
  export declare interface TypeDecorator {
8304
8280
  /**
8305
- * Invoke as ES7 decorator.
8281
+ * Invoke as decorator.
8306
8282
  */
8307
8283
  <T extends Type<any>>(type: T): T;
8308
8284
  (target: Object, propertyKey?: string | symbol, parameterIndex?: number): void;
@@ -8318,9 +8294,7 @@ export declare interface TypeDecorator {
8318
8294
  *
8319
8295
  * @usageNotes
8320
8296
  *
8321
- * ### Example
8322
- *
8323
- * {@example core/di/ts/provider_spec.ts region='TypeProvider'}
8297
+ * {@example core/di/ts/provider_spec.ts region='TypeProvider' linenums="false"}
8324
8298
  *
8325
8299
  * @publicApi
8326
8300
  */
@@ -8329,28 +8303,27 @@ export declare interface TypeProvider extends Type<any> {
8329
8303
 
8330
8304
  /**
8331
8305
  * Configures the `Injector` to return a value for a token.
8332
- *
8333
- * For more details, see the ["Dependency Injection Guide"](guide/dependency-injection).
8306
+ * @see ["Dependency Injection Guide"](guide/dependency-injection).
8334
8307
  *
8335
8308
  * @usageNotes
8336
8309
  *
8337
8310
  * ### Example
8338
8311
  *
8339
- * {@example core/di/ts/provider_spec.ts region='ValueProvider'}
8312
+ * {@example core/di/ts/provider_spec.ts region='ValueProvider' linenums="false"}
8340
8313
  *
8341
8314
  * ### Multi-value example
8342
8315
  *
8343
- * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
8316
+ * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect' linenums="false"}
8344
8317
  *
8345
8318
  * @publicApi
8346
8319
  */
8347
8320
  export declare interface ValueProvider extends ValueSansProvider {
8348
8321
  /**
8349
- * An injection token. (Typically an instance of `Type` or `InjectionToken`, but can be `any`).
8322
+ * An injection token. Typically an instance of `Type` or `InjectionToken`, but can be `any`.
8350
8323
  */
8351
8324
  provide: any;
8352
8325
  /**
8353
- * If true, then injector returns an array of instances. This is useful to allow multiple
8326
+ * When true, injector returns an array of instances. This is useful to allow multiple
8354
8327
  * providers spread across many files to provide configuration information to a common token.
8355
8328
  */
8356
8329
  multi?: boolean;
@@ -8423,37 +8396,40 @@ export declare interface ViewChildDecorator {
8423
8396
  *
8424
8397
  * **Metadata Properties**:
8425
8398
  *
8426
- * * **selector** - the directive type or the name used for querying.
8427
- * * **read** - read a different token from the queried elements.
8428
- * * **static** - whether or not to resolve query results before change detection runs (i.e.
8429
- * return static results only). If this option is not provided, the compiler will fall back
8430
- * to its default behavior, which is to use query results to determine the timing of query
8431
- * resolution. If any query results are inside a nested view (e.g. *ngIf), the query will be
8432
- * resolved after change detection runs. Otherwise, it will be resolved before change detection
8399
+ * * **selector** - The directive type or the name used for querying.
8400
+ * * **read** - True to read a different token from the queried elements.
8401
+ * * **static** - True to resolve query results before change detection runs
8402
+ *
8403
+ * When `static` is not provided, uses query results to determine the timing of query
8404
+ * resolution. If any query results are inside a nested view (such as `*ngIf`), the query is
8405
+ * resolved after change detection runs. Otherwise, it is resolved before change detection
8433
8406
  * runs.
8434
8407
  *
8435
- * Supported selectors include:
8436
- * * any class with the `@Component` or `@Directive` decorator
8437
- * * a template reference variable as a string (e.g. query `<my-component #cmp></my-component>`
8408
+ * The following selectors are supported.
8409
+ * * Any class with the `@Component` or `@Directive` decorator
8410
+ * * A template reference variable as a string (e.g. query `<my-component #cmp></my-component>`
8438
8411
  * with `@ViewChild('cmp')`)
8439
- * * any provider defined in the child component tree of the current component (e.g.
8412
+ * * Any provider defined in the child component tree of the current component (e.g.
8440
8413
  * `@ViewChild(SomeService) someService: SomeService`)
8441
- * * any provider defined through a string token (e.g. `@ViewChild('someToken') someTokenVal:
8414
+ * * Any provider defined through a string token (e.g. `@ViewChild('someToken') someTokenVal:
8442
8415
  * any`)
8443
- * * a `TemplateRef` (e.g. query `<ng-template></ng-template>` with `@ViewChild(TemplateRef)
8416
+ * * A `TemplateRef` (e.g. query `<ng-template></ng-template>` with `@ViewChild(TemplateRef)
8444
8417
  * template;`)
8445
8418
  *
8446
8419
  * @usageNotes
8447
8420
  *
8448
- * {@example core/di/ts/viewChild/view_child_example.ts region='Component'}
8421
+ * {@example core/di/ts/viewChild/view_child_example.ts region='Component'
8422
+ * linenums="false"}
8449
8423
  *
8450
- * ### Example
8424
+ * ### Example 2
8451
8425
  *
8452
- * {@example core/di/ts/viewChild/view_child_howto.ts region='HowTo'}
8426
+ * {@example core/di/ts/viewChild/view_child_howto.ts region='HowTo'
8427
+ * linenums="false"}
8453
8428
  *
8454
- * ### Example
8429
+ * ### Example 3
8455
8430
  *
8456
- * {@example core/di/ts/viewChild/view_child_example.ts region='Component'}
8431
+ * {@example core/di/ts/viewChild/view_child_example.ts region='Component'
8432
+ * linenums="false"}
8457
8433
  *
8458
8434
  * @Annotation
8459
8435
  */
@@ -8491,28 +8467,28 @@ export declare const ViewChildren: ViewChildrenDecorator;
8491
8467
  */
8492
8468
  export declare interface ViewChildrenDecorator {
8493
8469
  /**
8494
- * Configures a view query.
8470
+ * Parameter decorator that configures a view query.
8495
8471
  *
8496
- * You can use ViewChildren to get the `QueryList` of elements or directives from the
8497
- * view DOM. Any time a child element is added, removed, or moved, the query list will be updated,
8472
+ * Use to get the `QueryList` of elements or directives from the view DOM.
8473
+ * Any time a child element is added, removed, or moved, the query list will be updated,
8498
8474
  * and the changes observable of the query list will emit a new value.
8499
8475
  *
8500
8476
  * View queries are set before the `ngAfterViewInit` callback is called.
8501
8477
  *
8502
8478
  * **Metadata Properties**:
8503
8479
  *
8504
- * * **selector** - the directive type or the name used for querying.
8505
- * * **read** - read a different token from the queried elements.
8480
+ * * **selector** - The directive type or the name used for querying.
8481
+ * * **read** - True to read a different token from the queried elements.
8506
8482
  *
8507
8483
  * @usageNotes
8508
8484
  *
8509
- * ### Example
8510
- *
8511
- * {@example core/di/ts/viewChildren/view_children_howto.ts region='HowTo'}
8485
+ * {@example core/di/ts/viewChildren/view_children_howto.ts region='HowTo'
8486
+ * linenums="false"}
8512
8487
  *
8513
- * ### Example
8488
+ * ### Another example
8514
8489
  *
8515
- * {@example core/di/ts/viewChildren/view_children_example.ts region='Component'}
8490
+ * {@example core/di/ts/viewChildren/view_children_example.ts region='Component'
8491
+ * linenums="false"}
8516
8492
  *
8517
8493
  * @Annotation
8518
8494
  */