@angular/core 6.0.0-rc.3 → 6.0.0

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 (198) hide show
  1. package/bundles/core-testing.umd.js +95 -19
  2. package/bundles/core-testing.umd.js.map +1 -1
  3. package/bundles/core-testing.umd.min.js +10 -11
  4. package/bundles/core-testing.umd.min.js.map +1 -1
  5. package/bundles/core.umd.js +555 -389
  6. package/bundles/core.umd.js.map +1 -1
  7. package/bundles/core.umd.min.js +77 -77
  8. package/bundles/core.umd.min.js.map +1 -1
  9. package/core.metadata.json +1 -1
  10. package/esm2015/index.js +2 -2
  11. package/esm2015/public_api.js +2 -2
  12. package/esm2015/src/application_ref.js +6 -6
  13. package/esm2015/src/change_detection/change_detection_util.js +3 -3
  14. package/esm2015/src/change_detection/change_detector_ref.js +2 -2
  15. package/esm2015/src/change_detection/constants.js +1 -1
  16. package/esm2015/src/change_detection/differs/default_iterable_differ.js +15 -15
  17. package/esm2015/src/change_detection/differs/default_keyvalue_differ.js +2 -2
  18. package/esm2015/src/change_detection/differs/iterable_differs.js +15 -7
  19. package/esm2015/src/change_detection/differs/keyvalue_differs.js +6 -6
  20. package/esm2015/src/change_detection/pipe_transform.js +2 -2
  21. package/esm2015/src/core.js +4 -4
  22. package/esm2015/src/core_private_export.js +2 -2
  23. package/esm2015/src/core_render3_private_export.js +2 -2
  24. package/esm2015/src/di/defs.js +36 -19
  25. package/esm2015/src/di/injectable.js +3 -3
  26. package/esm2015/src/di/injection_token.js +2 -2
  27. package/esm2015/src/di/injector.js +35 -14
  28. package/esm2015/src/di/metadata.js +11 -11
  29. package/esm2015/src/di/provider.js +9 -9
  30. package/esm2015/src/di/r3_injector.js +12 -12
  31. package/esm2015/src/di/reflective_errors.js +3 -3
  32. package/esm2015/src/di.js +1 -1
  33. package/esm2015/src/error_handler.js +2 -2
  34. package/esm2015/src/event_emitter.js +2 -2
  35. package/esm2015/src/linker/compiler.js +2 -2
  36. package/esm2015/src/linker/component_factory.js +3 -3
  37. package/esm2015/src/linker/component_factory_resolver.js +2 -2
  38. package/esm2015/src/linker/element_ref.js +3 -3
  39. package/esm2015/src/linker/ng_module_factory.js +2 -2
  40. package/esm2015/src/linker/ng_module_factory_loader.js +2 -2
  41. package/esm2015/src/linker/query_list.js +2 -2
  42. package/esm2015/src/linker/template_ref.js +2 -2
  43. package/esm2015/src/linker/view_container_ref.js +2 -2
  44. package/esm2015/src/linker/view_ref.js +2 -2
  45. package/esm2015/src/metadata/di.js +12 -12
  46. package/esm2015/src/metadata/directives.js +15 -15
  47. package/esm2015/src/metadata/lifecycle_hooks.js +10 -10
  48. package/esm2015/src/metadata/ng_module.js +5 -5
  49. package/esm2015/src/metadata/view.js +1 -1
  50. package/esm2015/src/render3/assert.js +13 -1
  51. package/esm2015/src/render3/component.js +2 -1
  52. package/esm2015/src/render3/definition.js +4 -4
  53. package/esm2015/src/render3/di.js +61 -89
  54. package/esm2015/src/render3/hooks.js +7 -7
  55. package/esm2015/src/render3/index.js +1 -1
  56. package/esm2015/src/render3/instructions.js +128 -79
  57. package/esm2015/src/render3/interfaces/definition.js +9 -1
  58. package/esm2015/src/render3/interfaces/injector.js +1 -3
  59. package/esm2015/src/render3/interfaces/node.js +7 -11
  60. package/esm2015/src/render3/interfaces/view.js +17 -3
  61. package/esm2015/src/render3/node_manipulation.js +23 -3
  62. package/esm2015/src/render3/query.js +9 -7
  63. package/esm2015/src/sanitization/security.js +2 -2
  64. package/esm2015/src/type.js +2 -2
  65. package/esm2015/src/util/decorators.js +2 -2
  66. package/esm2015/src/util/lang.js +2 -2
  67. package/esm2015/src/version.js +4 -4
  68. package/esm2015/src/view/ng_module.js +5 -2
  69. package/esm2015/src/view/refs.js +1 -1
  70. package/esm2015/testing/src/async.js +2 -2
  71. package/esm2015/testing/src/async_fallback.js +2 -2
  72. package/esm2015/testing/src/component_fixture.js +2 -2
  73. package/esm2015/testing/src/test_bed.js +3 -3
  74. package/esm5/src/application_ref.js +7 -7
  75. package/esm5/src/change_detection/change_detection_util.js +7 -7
  76. package/esm5/src/change_detection/change_detector_ref.js +4 -4
  77. package/esm5/src/change_detection/constants.js +4 -4
  78. package/esm5/src/change_detection/differs/default_iterable_differ.js +18 -18
  79. package/esm5/src/change_detection/differs/default_keyvalue_differ.js +3 -3
  80. package/esm5/src/change_detection/differs/iterable_differs.js +9 -11
  81. package/esm5/src/change_detection/differs/keyvalue_differs.js +4 -4
  82. package/esm5/src/change_detection/pipe_transform.js +1 -1
  83. package/esm5/src/core_private_export.js +2 -2
  84. package/esm5/src/core_render3_private_export.js +2 -2
  85. package/esm5/src/di/defs.js +3 -6
  86. package/esm5/src/di/injectable.js +2 -2
  87. package/esm5/src/di/injection_token.js +4 -4
  88. package/esm5/src/di/injector.js +26 -11
  89. package/esm5/src/di/metadata.js +6 -6
  90. package/esm5/src/di/provider.js +1 -1
  91. package/esm5/src/di/r3_injector.js +12 -12
  92. package/esm5/src/di/reflective_errors.js +3 -3
  93. package/esm5/src/di.js +2 -2
  94. package/esm5/src/error_handler.js +4 -4
  95. package/esm5/src/event_emitter.js +4 -4
  96. package/esm5/src/linker/compiler.js +2 -2
  97. package/esm5/src/linker/component_factory.js +7 -7
  98. package/esm5/src/linker/component_factory_resolver.js +2 -2
  99. package/esm5/src/linker/element_ref.js +4 -4
  100. package/esm5/src/linker/ng_module_factory.js +4 -4
  101. package/esm5/src/linker/ng_module_factory_loader.js +4 -4
  102. package/esm5/src/linker/query_list.js +4 -4
  103. package/esm5/src/linker/template_ref.js +4 -4
  104. package/esm5/src/linker/view_container_ref.js +4 -4
  105. package/esm5/src/linker/view_ref.js +4 -4
  106. package/esm5/src/metadata/di.js +9 -9
  107. package/esm5/src/metadata/directives.js +8 -8
  108. package/esm5/src/metadata/lifecycle_hooks.js +1 -1
  109. package/esm5/src/metadata/ng_module.js +3 -3
  110. package/esm5/src/metadata/view.js +4 -4
  111. package/esm5/src/render3/assert.js +6 -1
  112. package/esm5/src/render3/component.js +2 -1
  113. package/esm5/src/render3/definition.js +1 -1
  114. package/esm5/src/render3/di.js +51 -74
  115. package/esm5/src/render3/hooks.js +6 -6
  116. package/esm5/src/render3/index.js +1 -1
  117. package/esm5/src/render3/instructions.js +123 -76
  118. package/esm5/src/render3/interfaces/definition.js +1 -1
  119. package/esm5/src/render3/interfaces/injector.js +1 -1
  120. package/esm5/src/render3/interfaces/node.js +1 -1
  121. package/esm5/src/render3/interfaces/view.js +1 -1
  122. package/esm5/src/render3/node_manipulation.js +20 -2
  123. package/esm5/src/render3/query.js +9 -7
  124. package/esm5/src/sanitization/security.js +7 -7
  125. package/esm5/src/type.js +2 -2
  126. package/esm5/src/util/decorators.js +1 -1
  127. package/esm5/src/util/lang.js +2 -2
  128. package/esm5/src/version.js +6 -6
  129. package/esm5/src/view/ng_module.js +5 -2
  130. package/esm5/src/view/refs.js +1 -1
  131. package/esm5/testing/src/async.js +2 -2
  132. package/esm5/testing/src/async_fallback.js +2 -2
  133. package/esm5/testing/src/component_fixture.js +4 -4
  134. package/esm5/testing/src/test_bed.js +5 -5
  135. package/fesm2015/core.js +468 -372
  136. package/fesm2015/core.js.map +1 -1
  137. package/fesm2015/testing.js +6 -6
  138. package/fesm2015/testing.js.map +1 -1
  139. package/fesm5/core.js +403 -321
  140. package/fesm5/core.js.map +1 -1
  141. package/fesm5/testing.js +6 -6
  142. package/fesm5/testing.js.map +1 -1
  143. package/package.json +5 -4
  144. package/src/application_ref.d.ts +5 -5
  145. package/src/change_detection/change_detection_util.d.ts +2 -2
  146. package/src/change_detection/change_detector_ref.d.ts +1 -1
  147. package/src/change_detection/constants.d.ts +1 -1
  148. package/src/change_detection/differs/default_iterable_differ.d.ts +1 -1
  149. package/src/change_detection/differs/iterable_differs.d.ts +8 -7
  150. package/src/change_detection/differs/keyvalue_differs.d.ts +5 -5
  151. package/src/change_detection/pipe_transform.d.ts +1 -1
  152. package/src/core_private_export.d.ts +1 -1
  153. package/src/core_render3_private_export.d.ts +1 -1
  154. package/src/di/defs.d.ts +29 -10
  155. package/src/di/injectable.d.ts +3 -3
  156. package/src/di/injection_token.d.ts +3 -4
  157. package/src/di/injector.d.ts +14 -11
  158. package/src/di/metadata.d.ts +20 -20
  159. package/src/di/provider.d.ts +10 -10
  160. package/src/di/r3_injector.d.ts +3 -3
  161. package/src/di/reflective_errors.d.ts +2 -2
  162. package/src/di.d.ts +1 -1
  163. package/src/error_handler.d.ts +1 -1
  164. package/src/event_emitter.d.ts +1 -1
  165. package/src/linker/compiler.d.ts +1 -1
  166. package/src/linker/component_factory.d.ts +2 -2
  167. package/src/linker/component_factory_resolver.d.ts +1 -1
  168. package/src/linker/element_ref.d.ts +2 -2
  169. package/src/linker/ng_module_factory.d.ts +1 -1
  170. package/src/linker/ng_module_factory_loader.d.ts +1 -1
  171. package/src/linker/query_list.d.ts +1 -1
  172. package/src/linker/template_ref.d.ts +1 -1
  173. package/src/linker/view_container_ref.d.ts +1 -1
  174. package/src/linker/view_ref.d.ts +1 -1
  175. package/src/metadata/di.d.ts +21 -21
  176. package/src/metadata/directives.d.ts +28 -28
  177. package/src/metadata/lifecycle_hooks.d.ts +9 -9
  178. package/src/metadata/ng_module.d.ts +5 -5
  179. package/src/metadata/view.d.ts +1 -1
  180. package/src/render3/assert.d.ts +1 -0
  181. package/src/render3/definition.d.ts +3 -3
  182. package/src/render3/di.d.ts +4 -14
  183. package/src/render3/index.d.ts +2 -1
  184. package/src/render3/instructions.d.ts +3 -3
  185. package/src/render3/interfaces/definition.d.ts +23 -4
  186. package/src/render3/interfaces/injector.d.ts +0 -2
  187. package/src/render3/interfaces/node.d.ts +7 -13
  188. package/src/render3/interfaces/view.d.ts +16 -3
  189. package/src/render3/node_manipulation.d.ts +3 -2
  190. package/src/sanitization/security.d.ts +2 -2
  191. package/src/type.d.ts +1 -1
  192. package/src/util/decorators.d.ts +1 -1
  193. package/src/version.d.ts +2 -2
  194. package/testing/src/async.d.ts +1 -1
  195. package/testing/src/async_fallback.d.ts +1 -1
  196. package/testing/src/component_fixture.d.ts +1 -1
  197. package/testing/src/test_bed.d.ts +2 -2
  198. package/testing.d.ts +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/core",
3
- "version": "6.0.0-rc.3",
3
+ "version": "6.0.0",
4
4
  "description": "Angular - the core framework",
5
5
  "main": "./bundles/core.umd.js",
6
6
  "module": "./fesm5/core.js",
@@ -16,8 +16,8 @@
16
16
  "tslib": "^1.9.0"
17
17
  },
18
18
  "peerDependencies": {
19
- "rxjs": "^6.0.0-rc.0",
20
- "zone.js": "~0.8.20"
19
+ "rxjs": "^6.0.0",
20
+ "zone.js": "~0.8.26"
21
21
  },
22
22
  "repository": {
23
23
  "type": "git",
@@ -25,12 +25,13 @@
25
25
  },
26
26
  "ng-update": {
27
27
  "packageGroup": [
28
- "@angular/bazel",
29
28
  "@angular/core",
29
+ "@angular/bazel",
30
30
  "@angular/common",
31
31
  "@angular/compiler",
32
32
  "@angular/compiler-cli",
33
33
  "@angular/animations",
34
+ "@angular/elements",
34
35
  "@angular/platform-browser",
35
36
  "@angular/platform-browser-dynamic",
36
37
  "@angular/forms",
@@ -22,7 +22,7 @@ export declare const ALLOW_MULTIPLE_PLATFORMS: InjectionToken<boolean>;
22
22
  * does not result in additional changes to any bindings (also known as
23
23
  * unidirectional data flow).
24
24
  *
25
- * @stable
25
+ *
26
26
  */
27
27
  export declare function enableProdMode(): void;
28
28
  /**
@@ -78,7 +78,7 @@ export declare function getPlatform(): PlatformRef | null;
78
78
  /**
79
79
  * Provides additional options to the bootstraping process.
80
80
  *
81
- * @stable
81
+ *
82
82
  */
83
83
  export interface BootstrapOptions {
84
84
  /**
@@ -98,7 +98,7 @@ export interface BootstrapOptions {
98
98
  * A page's platform is initialized implicitly when a platform is created via a platform factory
99
99
  * (e.g. {@link platformBrowser}), or explicitly by calling the {@link createPlatform} function.
100
100
  *
101
- * @stable
101
+ *
102
102
  */
103
103
  export declare class PlatformRef {
104
104
  private _injector;
@@ -142,7 +142,7 @@ export declare class PlatformRef {
142
142
  *
143
143
  * let moduleRef = platformBrowser().bootstrapModule(MyModule);
144
144
  * ```
145
- * @stable
145
+ *
146
146
  */
147
147
  bootstrapModule<M>(moduleType: Type<M>, compilerOptions?: (CompilerOptions & BootstrapOptions) | Array<CompilerOptions & BootstrapOptions>): Promise<NgModuleRef<M>>;
148
148
  private _moduleDoBootstrap(moduleRef);
@@ -164,7 +164,7 @@ export declare class PlatformRef {
164
164
  /**
165
165
  * A reference to an Angular application running on a page.
166
166
  *
167
- * @stable
167
+ *
168
168
  */
169
169
  export declare class ApplicationRef {
170
170
  private _zone;
@@ -16,7 +16,7 @@ export declare function devModeEqual(a: any, b: any): boolean;
16
16
  * return WrappedValue.wrap(this._latestValue); // this will force update
17
17
  * }
18
18
  * ```
19
- * @stable
19
+ *
20
20
  */
21
21
  export declare class WrappedValue {
22
22
  /** @deprecated from 5.3, use `unwrap()` instead - will switch to protected */
@@ -34,7 +34,7 @@ export declare class WrappedValue {
34
34
  }
35
35
  /**
36
36
  * Represents a basic change from a previous to a new value.
37
- * @stable
37
+ *
38
38
  */
39
39
  export declare class SimpleChange {
40
40
  previousValue: any;
@@ -6,7 +6,7 @@
6
6
  * found in the LICENSE file at https://angular.io/license
7
7
  */
8
8
  /**
9
- * @stable
9
+ *
10
10
  */
11
11
  export declare abstract class ChangeDetectorRef {
12
12
  /**
@@ -8,7 +8,7 @@
8
8
  /**
9
9
  * Describes within the change detector which strategy will be used the next time change
10
10
  * detection is triggered.
11
- * @stable
11
+ *
12
12
  */
13
13
  export declare enum ChangeDetectionStrategy {
14
14
  /**
@@ -39,7 +39,7 @@ export declare class DefaultIterableDiffer<V> implements IterableDiffer<V>, Iter
39
39
  private _addToRemovals(record);
40
40
  }
41
41
  /**
42
- * @stable
42
+ *
43
43
  */
44
44
  export declare class IterableChangeRecord_<V> implements IterableChangeRecord<V> {
45
45
  item: V;
@@ -2,14 +2,14 @@ import { StaticProvider } from '../../di/provider';
2
2
  /**
3
3
  * A type describing supported iterable types.
4
4
  *
5
- * @stable
5
+ *
6
6
  */
7
7
  export declare type NgIterable<T> = Array<T> | Iterable<T>;
8
8
  /**
9
9
  * A strategy for tracking changes over time to an iterable. Used by {@link NgForOf} to
10
10
  * respond to changes in an iterable by effecting equivalent changes in the DOM.
11
11
  *
12
- * @stable
12
+ *
13
13
  */
14
14
  export interface IterableDiffer<V> {
15
15
  /**
@@ -25,7 +25,7 @@ export interface IterableDiffer<V> {
25
25
  * An object describing the changes in the `Iterable` collection since last time
26
26
  * `IterableDiffer#diff()` was invoked.
27
27
  *
28
- * @stable
28
+ *
29
29
  */
30
30
  export interface IterableChanges<V> {
31
31
  /**
@@ -68,7 +68,7 @@ export interface IterableChanges<V> {
68
68
  /**
69
69
  * Record representing the item change information.
70
70
  *
71
- * @stable
71
+ *
72
72
  */
73
73
  export interface IterableChangeRecord<V> {
74
74
  /** Current index of the item in `Iterable` or null if removed. */
@@ -89,7 +89,7 @@ export interface CollectionChangeRecord<V> extends IterableChangeRecord<V> {
89
89
  * An optional function passed into {@link NgForOf} that defines how to track
90
90
  * items in an iterable (e.g. fby index or id)
91
91
  *
92
- * @stable
92
+ *
93
93
  */
94
94
  export interface TrackByFunction<T> {
95
95
  (index: number, item: T): any;
@@ -97,7 +97,7 @@ export interface TrackByFunction<T> {
97
97
  /**
98
98
  * Provides a factory for {@link IterableDiffer}.
99
99
  *
100
- * @stable
100
+ *
101
101
  */
102
102
  export interface IterableDifferFactory {
103
103
  supports(objects: any): boolean;
@@ -105,9 +105,10 @@ export interface IterableDifferFactory {
105
105
  }
106
106
  /**
107
107
  * A repository of different iterable diffing strategies used by NgFor, NgClass, and others.
108
- * @stable
108
+ *
109
109
  */
110
110
  export declare class IterableDiffers {
111
+ static ngInjectableDef: never;
111
112
  /**
112
113
  * @deprecated v4.0.0 - Should be private
113
114
  */
@@ -9,7 +9,7 @@ import { StaticProvider } from '../../di';
9
9
  /**
10
10
  * A differ that tracks changes made to an object over time.
11
11
  *
12
- * @stable
12
+ *
13
13
  */
14
14
  export interface KeyValueDiffer<K, V> {
15
15
  /**
@@ -35,7 +35,7 @@ export interface KeyValueDiffer<K, V> {
35
35
  * An object describing the changes in the `Map` or `{[k:string]: string}` since last time
36
36
  * `KeyValueDiffer#diff()` was invoked.
37
37
  *
38
- * @stable
38
+ *
39
39
  */
40
40
  export interface KeyValueChanges<K, V> {
41
41
  /**
@@ -64,7 +64,7 @@ export interface KeyValueChanges<K, V> {
64
64
  /**
65
65
  * Record representing the item change information.
66
66
  *
67
- * @stable
67
+ *
68
68
  */
69
69
  export interface KeyValueChangeRecord<K, V> {
70
70
  /**
@@ -83,7 +83,7 @@ export interface KeyValueChangeRecord<K, V> {
83
83
  /**
84
84
  * Provides a factory for {@link KeyValueDiffer}.
85
85
  *
86
- * @stable
86
+ *
87
87
  */
88
88
  export interface KeyValueDifferFactory {
89
89
  /**
@@ -97,7 +97,7 @@ export interface KeyValueDifferFactory {
97
97
  }
98
98
  /**
99
99
  * A repository of different Map diffing strategies used by NgClass, NgStyle, and others.
100
- * @stable
100
+ *
101
101
  */
102
102
  export declare class KeyValueDiffers {
103
103
  /**
@@ -32,7 +32,7 @@
32
32
  *
33
33
  * Invoking `{{ 'ok' | repeat:3 }}` in a template produces `okokok`.
34
34
  *
35
- * @stable
35
+ *
36
36
  */
37
37
  export interface PipeTransform {
38
38
  transform(value: any, ...args: any[]): any;
@@ -12,7 +12,7 @@ export { devModeEqual as ɵdevModeEqual } from './change_detection/change_detect
12
12
  export { isListLikeIterable as ɵisListLikeIterable } from './change_detection/change_detection_util';
13
13
  export { ChangeDetectorStatus as ɵChangeDetectorStatus, isDefaultChangeDetectionStrategy as ɵisDefaultChangeDetectionStrategy } from './change_detection/constants';
14
14
  export { Console as ɵConsole } from './console';
15
- export { setCurrentInjector as ɵsetCurrentInjector } from './di/injector';
15
+ export { inject as ɵinject, setCurrentInjector as ɵsetCurrentInjector } from './di/injector';
16
16
  export { APP_ROOT as ɵAPP_ROOT } from './di/scope';
17
17
  export { ComponentFactory as ɵComponentFactory } from './linker/component_factory';
18
18
  export { CodegenComponentFactoryResolver as ɵCodegenComponentFactoryResolver } from './linker/component_factory_resolver';
@@ -5,5 +5,5 @@
5
5
  * Use of this source code is governed by an MIT-style license that can be
6
6
  * found in the LICENSE file at https://angular.io/license
7
7
  */
8
- export { defineComponent as ɵdefineComponent, defineDirective as ɵdefineDirective, definePipe as ɵdefinePipe, detectChanges as ɵdetectChanges, renderComponent as ɵrenderComponent, ComponentType as ɵComponentType, DirectiveType as ɵDirectiveType, directiveInject as ɵdirectiveInject, injectTemplateRef as ɵinjectTemplateRef, injectViewContainerRef as ɵinjectViewContainerRef, injectChangeDetectorRef as ɵinjectChangeDetectorRef, injectAttribute as ɵinjectAttribute, InjectFlags as ɵInjectFlags, PublicFeature as ɵPublicFeature, NgOnChangesFeature as ɵNgOnChangesFeature, CssSelectorList as ɵCssSelectorList, markDirty as ɵmarkDirty, NC as ɵNC, C as ɵC, E as ɵE, L as ɵL, T as ɵT, V as ɵV, Q as ɵQ, d as ɵd, P as ɵP, b as ɵb, i1 as ɵi1, i2 as ɵi2, i3 as ɵi3, i4 as ɵi4, i5 as ɵi5, i6 as ɵi6, i7 as ɵi7, i8 as ɵi8, iV as ɵiV, pb1 as ɵpb1, pb2 as ɵpb2, pb3 as ɵpb3, pb4 as ɵpb4, pbV as ɵpbV, f0 as ɵf0, f1 as ɵf1, f2 as ɵf2, f3 as ɵf3, f4 as ɵf4, f5 as ɵf5, f6 as ɵf6, f7 as ɵf7, f8 as ɵf8, fV as ɵfV, cR as ɵcR, cr as ɵcr, qR as ɵqR, e as ɵe, p as ɵp, pD as ɵpD, a as ɵa, s as ɵs, sn as ɵsn, k as ɵk, kn as ɵkn, t as ɵt, v as ɵv, st as ɵst, ld as ɵld, Pp as ɵPp, ComponentDef as ɵComponentDef, DirectiveDef as ɵDirectiveDef, PipeDef as ɵPipeDef } from './render3/index';
8
+ export { defineComponent as ɵdefineComponent, defineDirective as ɵdefineDirective, definePipe as ɵdefinePipe, detectChanges as ɵdetectChanges, renderComponent as ɵrenderComponent, ComponentType as ɵComponentType, DirectiveType as ɵDirectiveType, RenderFlags as ɵRenderFlags, directiveInject as ɵdirectiveInject, injectTemplateRef as ɵinjectTemplateRef, injectViewContainerRef as ɵinjectViewContainerRef, injectChangeDetectorRef as ɵinjectChangeDetectorRef, injectAttribute as ɵinjectAttribute, PublicFeature as ɵPublicFeature, NgOnChangesFeature as ɵNgOnChangesFeature, CssSelectorList as ɵCssSelectorList, markDirty as ɵmarkDirty, NC as ɵNC, C as ɵC, E as ɵE, L as ɵL, T as ɵT, V as ɵV, Q as ɵQ, d as ɵd, P as ɵP, b as ɵb, i1 as ɵi1, i2 as ɵi2, i3 as ɵi3, i4 as ɵi4, i5 as ɵi5, i6 as ɵi6, i7 as ɵi7, i8 as ɵi8, iV as ɵiV, pb1 as ɵpb1, pb2 as ɵpb2, pb3 as ɵpb3, pb4 as ɵpb4, pbV as ɵpbV, f0 as ɵf0, f1 as ɵf1, f2 as ɵf2, f3 as ɵf3, f4 as ɵf4, f5 as ɵf5, f6 as ɵf6, f7 as ɵf7, f8 as ɵf8, fV as ɵfV, cR as ɵcR, cr as ɵcr, qR as ɵqR, e as ɵe, p as ɵp, pD as ɵpD, a as ɵa, s as ɵs, sn as ɵsn, k as ɵk, kn as ɵkn, t as ɵt, v as ɵv, st as ɵst, ld as ɵld, Pp as ɵPp, ComponentDef as ɵComponentDef, DirectiveDef as ɵDirectiveDef, PipeDef as ɵPipeDef, whenRendered as ɵwhenRendered } from './render3/index';
9
9
  export { bypassSanitizationTrustHtml as ɵbypassSanitizationTrustHtml, bypassSanitizationTrustStyle as ɵbypassSanitizationTrustStyle, bypassSanitizationTrustScript as ɵbypassSanitizationTrustScript, bypassSanitizationTrustUrl as ɵbypassSanitizationTrustUrl, bypassSanitizationTrustResourceUrl as ɵbypassSanitizationTrustResourceUrl, sanitizeHtml as ɵsanitizeHtml, sanitizeStyle as ɵsanitizeStyle, sanitizeUrl as ɵsanitizeUrl, sanitizeResourceUrl as ɵsanitizeResourceUrl } from './sanitization/sanitization';
package/src/di/defs.d.ts CHANGED
@@ -17,13 +17,26 @@ import { ClassProvider, ConstructorProvider, ExistingProvider, FactoryProvider,
17
17
  * `InjectorDef`, `NgModule`, or a special scope (e.g. `'root'`). A value of `null` indicates
18
18
  * that the injectable does not belong to any scope.
19
19
  *
20
- * This type is typically generated by the Angular compiler, but can be hand-written if needed.
21
- *
22
- * @experimental
20
+ * NOTE: This is a private type and should not be exported
23
21
  */
24
22
  export interface InjectableDef<T> {
23
+ /**
24
+ * Specifies that the given type belongs to a particular injector:
25
+ * - `InjectorType` such as `NgModule`,
26
+ * - `'root'` the root injector
27
+ * - `'any'` all injectors.
28
+ * - `null`, does not belong to any injector. Must be explicitly listed in the injector
29
+ * `providers`.
30
+ */
25
31
  providedIn: InjectorType<any> | 'root' | 'any' | null;
32
+ /**
33
+ * Factory method to execute to create an instance of the injectable.
34
+ */
26
35
  factory: () => T;
36
+ /**
37
+ * In a case of no explicit injector, a location where the instance of the injectable is stored.
38
+ */
39
+ value: T | undefined;
27
40
  }
28
41
  /**
29
42
  * Information about the providers to be included in an `Injector` as well as how the given type
@@ -33,7 +46,7 @@ export interface InjectableDef<T> {
33
46
  * structure of providers with a defined priority (identically to how `NgModule`s also have
34
47
  * an import/dependency structure).
35
48
  *
36
- * @experimental
49
+ * NOTE: This is a private type and should not be exported
37
50
  */
38
51
  export interface InjectorDef<T> {
39
52
  factory: () => T;
@@ -49,7 +62,10 @@ export interface InjectorDef<T> {
49
62
  * @experimental
50
63
  */
51
64
  export interface InjectableType<T> extends Type<T> {
52
- ngInjectableDef: InjectableDef<T>;
65
+ /**
66
+ * Opaque type whose structure is highly version dependent. Do not rely on any properties.
67
+ */
68
+ ngInjectableDef: never;
53
69
  }
54
70
  /**
55
71
  * A type which has an `InjectorDef` static field.
@@ -59,7 +75,10 @@ export interface InjectableType<T> extends Type<T> {
59
75
  * @experimental
60
76
  */
61
77
  export interface InjectorType<T> extends Type<T> {
62
- ngInjectorDef: InjectorDef<T>;
78
+ /**
79
+ * Opaque type whose structure is highly version dependent. Do not rely on any properties.
80
+ */
81
+ ngInjectorDef: never;
63
82
  }
64
83
  /**
65
84
  * Describes the `InjectorDef` equivalent of a `ModuleWithProviders`, an `InjectorDefType` with an
@@ -67,7 +86,7 @@ export interface InjectorType<T> extends Type<T> {
67
86
  *
68
87
  * Objects of this type can be listed in the imports section of an `InjectorDef`.
69
88
  *
70
- * @experimental
89
+ * NOTE: This is a private type and should not be exported
71
90
  */
72
91
  export interface InjectorTypeWithProviders<T> {
73
92
  ngModule: InjectorType<T>;
@@ -90,9 +109,9 @@ export interface InjectorTypeWithProviders<T> {
90
109
  * @experimental
91
110
  */
92
111
  export declare function defineInjectable<T>(opts: {
93
- providedIn?: Type<any> | 'root' | null;
112
+ providedIn?: Type<any> | 'root' | 'any' | null;
94
113
  factory: () => T;
95
- }): InjectableDef<T>;
114
+ }): never;
96
115
  /**
97
116
  * Construct an `InjectorDef` which configures an injector.
98
117
  *
@@ -117,4 +136,4 @@ export declare function defineInjector(options: {
117
136
  factory: () => any;
118
137
  providers?: any[];
119
138
  imports?: any[];
120
- }): InjectorDef<any>;
139
+ }): never;
@@ -10,7 +10,7 @@ export declare type InjectableProvider = ValueSansProvider | ExistingSansProvide
10
10
  /**
11
11
  * Type of the Injectable decorator / constructor function.
12
12
  *
13
- * @stable
13
+ *
14
14
  */
15
15
  export interface InjectableDecorator {
16
16
  /**
@@ -34,7 +34,7 @@ export interface InjectableDecorator {
34
34
  *
35
35
  * {@example core/di/ts/metadata_spec.ts region='InjectableThrows'}
36
36
  *
37
- * @stable
37
+ *
38
38
  */
39
39
  (): any;
40
40
  (options?: {
@@ -58,7 +58,7 @@ export declare function convertInjectableProviderToFactory(type: Type<any>, prov
58
58
  /**
59
59
  * Injectable decorator and metadata.
60
60
  *
61
- * @stable
61
+ *
62
62
  * @Annotation
63
63
  */
64
64
  export declare const Injectable: InjectableDecorator;
@@ -6,7 +6,6 @@
6
6
  * found in the LICENSE file at https://angular.io/license
7
7
  */
8
8
  import { Type } from '../type';
9
- import { InjectableDef } from './defs';
10
9
  /**
11
10
  * Creates a token that can be used in a DI Provider.
12
11
  *
@@ -43,11 +42,11 @@ import { InjectableDef } from './defs';
43
42
  *
44
43
  * {@example core/di/ts/injector_spec.ts region='InjectionToken'}
45
44
  *
46
- * @stable
45
+ *
47
46
  */
48
47
  export declare class InjectionToken<T> {
49
48
  protected _desc: string;
50
- readonly ngInjectableDef: InjectableDef<T> | undefined;
49
+ readonly ngInjectableDef: never | undefined;
51
50
  constructor(_desc: string, options?: {
52
51
  providedIn?: Type<any> | 'root' | null;
53
52
  factory: () => T;
@@ -55,5 +54,5 @@ export declare class InjectionToken<T> {
55
54
  toString(): string;
56
55
  }
57
56
  export interface InjectableDefToken<T> extends InjectionToken<T> {
58
- ngInjectableDef: InjectableDef<T>;
57
+ ngInjectableDef: never;
59
58
  }
@@ -6,7 +6,6 @@
6
6
  * found in the LICENSE file at https://angular.io/license
7
7
  */
8
8
  import { Type } from '../type';
9
- import { InjectableDef } from './defs';
10
9
  import { InjectionToken } from './injection_token';
11
10
  import { StaticProvider } from './provider';
12
11
  export declare const SOURCE = "__source";
@@ -43,7 +42,7 @@ export declare class NullInjector implements Injector {
43
42
  * `Injector` returns itself when given `Injector` as a token:
44
43
  * {@example core/di/ts/injector_spec.ts region='injectInjector'}
45
44
  *
46
- * @stable
45
+ *
47
46
  */
48
47
  export declare abstract class Injector {
49
48
  static THROW_IF_NOT_FOUND: Object;
@@ -70,7 +69,7 @@ export declare abstract class Injector {
70
69
  parent?: Injector;
71
70
  name?: string;
72
71
  }): Injector;
73
- static ngInjectableDef: InjectableDef<Injector>;
72
+ static ngInjectableDef: never;
74
73
  }
75
74
  export declare const USE_VALUE: string;
76
75
  export declare class StaticInjector implements Injector {
@@ -84,17 +83,22 @@ export declare class StaticInjector implements Injector {
84
83
  }
85
84
  /**
86
85
  * Injection flags for DI.
87
- *
88
- * @stable
89
86
  */
90
87
  export declare const enum InjectFlags {
91
88
  Default = 0,
92
- /** Skip the node that is requesting injection. */
93
- SkipSelf = 1,
89
+ /**
90
+ * Specifies that an injector should retrieve a dependency from any injector until reaching the
91
+ * host element of the current component. (Only used with Element Injector)
92
+ */
93
+ Host = 1,
94
94
  /** Don't descend into ancestors of the node requesting injection. */
95
95
  Self = 2,
96
+ /** Skip the node that is requesting injection. */
97
+ SkipSelf = 4,
98
+ /** Inject `defaultValue` instead if token not found. */
99
+ Optional = 8,
96
100
  }
97
- export declare function setCurrentInjector(injector: Injector | null): Injector | null;
101
+ export declare function setCurrentInjector(injector: Injector | null | undefined): Injector | undefined | null;
98
102
  /**
99
103
  * Injects a token from the currently active injector.
100
104
  *
@@ -109,7 +113,6 @@ export declare function setCurrentInjector(injector: Injector | null): Injector
109
113
  *
110
114
  * @experimental
111
115
  */
112
- export declare function inject<T>(token: Type<T> | InjectionToken<T>, notFoundValue?: undefined, flags?: InjectFlags): T;
113
- export declare function inject<T>(token: Type<T> | InjectionToken<T>, notFoundValue: T, flags?: InjectFlags): T;
114
- export declare function inject<T>(token: Type<T> | InjectionToken<T>, notFoundValue: null, flags?: InjectFlags): T | null;
116
+ export declare function inject<T>(token: Type<T> | InjectionToken<T>): T;
117
+ export declare function inject<T>(token: Type<T> | InjectionToken<T>, flags?: InjectFlags): T | null;
115
118
  export declare function injectArgs(types: (Type<any> | InjectionToken<any> | any[])[]): any[];
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Type of the Inject decorator / constructor function.
3
3
  *
4
- * @stable
4
+ *
5
5
  */
6
6
  export interface InjectDecorator {
7
7
  /**
@@ -29,7 +29,7 @@ export interface InjectDecorator {
29
29
  *
30
30
  * {@example core/di/ts/metadata_spec.ts region='InjectWithoutDecorator'}
31
31
  *
32
- * @stable
32
+ *
33
33
  */
34
34
  (token: any): any;
35
35
  new (token: any): Inject;
@@ -37,7 +37,7 @@ export interface InjectDecorator {
37
37
  /**
38
38
  * Type of the Inject metadata.
39
39
  *
40
- * @stable
40
+ *
41
41
  */
42
42
  export interface Inject {
43
43
  token: any;
@@ -45,14 +45,14 @@ export interface Inject {
45
45
  /**
46
46
  * Inject decorator and metadata.
47
47
  *
48
- * @stable
48
+ *
49
49
  * @Annotation
50
50
  */
51
51
  export declare const Inject: InjectDecorator;
52
52
  /**
53
53
  * Type of the Optional decorator / constructor function.
54
54
  *
55
- * @stable
55
+ *
56
56
  */
57
57
  export interface OptionalDecorator {
58
58
  /**
@@ -74,7 +74,7 @@ export interface OptionalDecorator {
74
74
  *
75
75
  * {@example core/di/ts/metadata_spec.ts region='Optional'}
76
76
  *
77
- * @stable
77
+ *
78
78
  */
79
79
  (): any;
80
80
  new (): Optional;
@@ -82,21 +82,21 @@ export interface OptionalDecorator {
82
82
  /**
83
83
  * Type of the Optional metadata.
84
84
  *
85
- * @stable
85
+ *
86
86
  */
87
87
  export interface Optional {
88
88
  }
89
89
  /**
90
90
  * Optional decorator and metadata.
91
91
  *
92
- * @stable
92
+ *
93
93
  * @Annotation
94
94
  */
95
95
  export declare const Optional: OptionalDecorator;
96
96
  /**
97
97
  * Type of the Self decorator / constructor function.
98
98
  *
99
- * @stable
99
+ *
100
100
  */
101
101
  export interface SelfDecorator {
102
102
  /**
@@ -117,7 +117,7 @@ export interface SelfDecorator {
117
117
  *
118
118
  * {@example core/di/ts/metadata_spec.ts region='Self'}
119
119
  *
120
- * @stable
120
+ *
121
121
  */
122
122
  (): any;
123
123
  new (): Self;
@@ -125,21 +125,21 @@ export interface SelfDecorator {
125
125
  /**
126
126
  * Type of the Self metadata.
127
127
  *
128
- * @stable
128
+ *
129
129
  */
130
130
  export interface Self {
131
131
  }
132
132
  /**
133
133
  * Self decorator and metadata.
134
134
  *
135
- * @stable
135
+ *
136
136
  * @Annotation
137
137
  */
138
138
  export declare const Self: SelfDecorator;
139
139
  /**
140
140
  * Type of the SkipSelf decorator / constructor function.
141
141
  *
142
- * @stable
142
+ *
143
143
  */
144
144
  export interface SkipSelfDecorator {
145
145
  /**
@@ -160,7 +160,7 @@ export interface SkipSelfDecorator {
160
160
  *
161
161
  * {@example core/di/ts/metadata_spec.ts region='SkipSelf'}
162
162
  *
163
- * @stable
163
+ *
164
164
  */
165
165
  (): any;
166
166
  new (): SkipSelf;
@@ -168,21 +168,21 @@ export interface SkipSelfDecorator {
168
168
  /**
169
169
  * Type of the SkipSelf metadata.
170
170
  *
171
- * @stable
171
+ *
172
172
  */
173
173
  export interface SkipSelf {
174
174
  }
175
175
  /**
176
176
  * SkipSelf decorator and metadata.
177
177
  *
178
- * @stable
178
+ *
179
179
  * @Annotation
180
180
  */
181
181
  export declare const SkipSelf: SkipSelfDecorator;
182
182
  /**
183
183
  * Type of the Host decorator / constructor function.
184
184
  *
185
- * @stable
185
+ *
186
186
  */
187
187
  export interface HostDecorator {
188
188
  /**
@@ -204,7 +204,7 @@ export interface HostDecorator {
204
204
  *
205
205
  * {@example core/di/ts/metadata_spec.ts region='Host'}
206
206
  *
207
- * @stable
207
+ *
208
208
  */
209
209
  (): any;
210
210
  new (): Host;
@@ -212,14 +212,14 @@ export interface HostDecorator {
212
212
  /**
213
213
  * Type of the Host metadata.
214
214
  *
215
- * @stable
215
+ *
216
216
  */
217
217
  export interface Host {
218
218
  }
219
219
  /**
220
220
  * Host decorator and metadata.
221
221
  *
222
- * @stable
222
+ *
223
223
  * @Annotation
224
224
  */
225
225
  export declare const Host: HostDecorator;