@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.
- package/bundles/core-testing.umd.js +1 -1
- package/bundles/core-testing.umd.min.js +1 -1
- package/bundles/core-testing.umd.min.js.map +1 -1
- package/bundles/core.umd.js +19 -13
- package/bundles/core.umd.js.map +1 -1
- package/bundles/core.umd.min.js +2 -2
- package/bundles/core.umd.min.js.map +1 -1
- package/core.d.ts +175 -199
- package/core.metadata.json +1 -1
- package/esm2015/src/change_detection/pipe_transform.js +4 -6
- package/esm2015/src/di/index.js +1 -1
- package/esm2015/src/di/injectable.js +1 -1
- package/esm2015/src/di/interface/provider.js +1 -1
- package/esm2015/src/di/metadata.js +1 -1
- package/esm2015/src/event_emitter.js +3 -10
- package/esm2015/src/linker/component_factory.js +9 -3
- package/esm2015/src/linker/component_factory_resolver.js +9 -2
- package/esm2015/src/metadata/di.js +1 -1
- package/esm2015/src/metadata/directives.js +4 -3
- package/esm2015/src/util/decorators.js +1 -1
- package/esm2015/src/version.js +1 -1
- package/esm5/src/change_detection/pipe_transform.js +1 -1
- package/esm5/src/di/index.js +1 -1
- package/esm5/src/di/injectable.js +1 -1
- package/esm5/src/di/interface/provider.js +1 -1
- package/esm5/src/di/metadata.js +1 -1
- package/esm5/src/event_emitter.js +3 -10
- package/esm5/src/linker/component_factory.js +7 -1
- package/esm5/src/linker/component_factory_resolver.js +7 -1
- package/esm5/src/metadata/di.js +1 -1
- package/esm5/src/metadata/directives.js +4 -3
- package/esm5/src/util/decorators.js +1 -1
- package/esm5/src/version.js +1 -1
- package/fesm2015/core.js +19 -13
- package/fesm2015/core.js.map +1 -1
- package/fesm2015/testing.js +1 -1
- package/fesm5/core.js +19 -13
- package/fesm5/core.js.map +1 -1
- package/fesm5/testing.js +1 -1
- package/package.json +1 -1
- package/src/r3_symbols.d.ts +64 -79
- package/testing/testing.d.ts +1 -1
- package/testing.d.ts +1 -1
package/fesm5/testing.js
CHANGED
package/package.json
CHANGED
package/src/r3_symbols.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v8.1.
|
|
2
|
+
* @license Angular v8.1.1
|
|
3
3
|
* (c) 2010-2019 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -103,22 +103,19 @@ declare abstract class ChangeDetectorRef {
|
|
|
103
103
|
|
|
104
104
|
/**
|
|
105
105
|
* Configures the `Injector` to return an instance of `useClass` for a token.
|
|
106
|
-
*
|
|
107
|
-
* For more details, see the ["Dependency Injection Guide"](guide/dependency-injection).
|
|
106
|
+
* @see ["Dependency Injection Guide"](guide/dependency-injection).
|
|
108
107
|
*
|
|
109
108
|
* @usageNotes
|
|
110
109
|
*
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
* {@example core/di/ts/provider_spec.ts region='ClassProvider'}
|
|
110
|
+
* {@example core/di/ts/provider_spec.ts region='ClassProvider' linenums="false"}
|
|
114
111
|
*
|
|
115
112
|
* Note that following two providers are not equal:
|
|
116
113
|
*
|
|
117
|
-
* {@example core/di/ts/provider_spec.ts region='ClassProviderDifference'}
|
|
114
|
+
* {@example core/di/ts/provider_spec.ts region='ClassProviderDifference' linenums="false"}
|
|
118
115
|
*
|
|
119
116
|
* ### Multi-value example
|
|
120
117
|
*
|
|
121
|
-
* {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
|
|
118
|
+
* {@example core/di/ts/provider_spec.ts region='MultiProviderAspect' linenums="false"}
|
|
122
119
|
*
|
|
123
120
|
* @publicApi
|
|
124
121
|
*/
|
|
@@ -128,7 +125,7 @@ declare interface ClassProvider extends ClassSansProvider {
|
|
|
128
125
|
*/
|
|
129
126
|
provide: any;
|
|
130
127
|
/**
|
|
131
|
-
*
|
|
128
|
+
* When true, injector returns an array of instances. This is useful to allow multiple
|
|
132
129
|
* providers spread across many files to provide configuration information to a common token.
|
|
133
130
|
*/
|
|
134
131
|
multi?: boolean;
|
|
@@ -138,7 +135,7 @@ declare interface ClassProvider extends ClassSansProvider {
|
|
|
138
135
|
* Configures the `Injector` to return a value by invoking a `useClass` function.
|
|
139
136
|
* Base for `ClassProvider` decorator.
|
|
140
137
|
*
|
|
141
|
-
*
|
|
138
|
+
* @see ["Dependency Injection Guide"](guide/dependency-injection).
|
|
142
139
|
*
|
|
143
140
|
* @publicApi
|
|
144
141
|
*/
|
|
@@ -150,6 +147,12 @@ declare interface ClassSansProvider {
|
|
|
150
147
|
}
|
|
151
148
|
|
|
152
149
|
/**
|
|
150
|
+
* Base class for a factory that can create a component dynamically.
|
|
151
|
+
* Instantiate a factory for a given type of component with `resolveComponentFactory()`.
|
|
152
|
+
* Use the resulting `ComponentFactory.create()` method to create a component of that type.
|
|
153
|
+
*
|
|
154
|
+
* @see [Dynamic Components](guide/dynamic-component-loader)
|
|
155
|
+
*
|
|
153
156
|
* @publicApi
|
|
154
157
|
*/
|
|
155
158
|
declare abstract class ComponentFactory<C> {
|
|
@@ -158,7 +161,7 @@ declare abstract class ComponentFactory<C> {
|
|
|
158
161
|
*/
|
|
159
162
|
abstract readonly selector: string;
|
|
160
163
|
/**
|
|
161
|
-
* The component
|
|
164
|
+
* The type of component the factory will create.
|
|
162
165
|
*/
|
|
163
166
|
abstract readonly componentType: Type<any>;
|
|
164
167
|
/**
|
|
@@ -186,10 +189,20 @@ declare abstract class ComponentFactory<C> {
|
|
|
186
189
|
}
|
|
187
190
|
|
|
188
191
|
/**
|
|
192
|
+
* A simple registry that maps `Components` to generated `ComponentFactory` classes
|
|
193
|
+
* that can be used to create instances of components.
|
|
194
|
+
* Use to obtain the factory for a given component type,
|
|
195
|
+
* then use the factory's `create()` method to create a component of that type.
|
|
196
|
+
*
|
|
197
|
+
* @see [Dynamic Components](guide/dynamic-component-loader)
|
|
189
198
|
* @publicApi
|
|
190
199
|
*/
|
|
191
200
|
declare abstract class ComponentFactoryResolver {
|
|
192
201
|
static NULL: ComponentFactoryResolver;
|
|
202
|
+
/**
|
|
203
|
+
* Retrieves the factory object that creates a component of the given type.
|
|
204
|
+
* @param component The component type.
|
|
205
|
+
*/
|
|
193
206
|
abstract resolveComponentFactory<T>(component: Type<T>): ComponentFactory<T>;
|
|
194
207
|
}
|
|
195
208
|
|
|
@@ -223,7 +236,7 @@ declare abstract class ComponentRef<C> {
|
|
|
223
236
|
*/
|
|
224
237
|
abstract readonly changeDetectorRef: ChangeDetectorRef;
|
|
225
238
|
/**
|
|
226
|
-
* The component
|
|
239
|
+
* The type of this component (as created by a `ComponentFactory` class).
|
|
227
240
|
*/
|
|
228
241
|
abstract readonly componentType: Type<any>;
|
|
229
242
|
/**
|
|
@@ -242,27 +255,25 @@ declare abstract class ComponentRef<C> {
|
|
|
242
255
|
/**
|
|
243
256
|
* Configures the `Injector` to return an instance of a token.
|
|
244
257
|
*
|
|
245
|
-
*
|
|
258
|
+
* @see ["Dependency Injection Guide"](guide/dependency-injection).
|
|
246
259
|
*
|
|
247
260
|
* @usageNotes
|
|
248
261
|
*
|
|
249
|
-
*
|
|
250
|
-
*
|
|
251
|
-
* {@example core/di/ts/provider_spec.ts region='ConstructorProvider'}
|
|
262
|
+
* {@example core/di/ts/provider_spec.ts region='ConstructorProvider' linenums="false"}
|
|
252
263
|
*
|
|
253
264
|
* ### Multi-value example
|
|
254
265
|
*
|
|
255
|
-
* {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
|
|
266
|
+
* {@example core/di/ts/provider_spec.ts region='MultiProviderAspect' linenums="false"}
|
|
256
267
|
*
|
|
257
268
|
* @publicApi
|
|
258
269
|
*/
|
|
259
270
|
declare interface ConstructorProvider extends ConstructorSansProvider {
|
|
260
271
|
/**
|
|
261
|
-
* An injection token.
|
|
272
|
+
* An injection token. Typically an instance of `Type` or `InjectionToken`, but can be `any`.
|
|
262
273
|
*/
|
|
263
274
|
provide: Type<any>;
|
|
264
275
|
/**
|
|
265
|
-
*
|
|
276
|
+
* When true, injector returns an array of instances. This is useful to allow multiple
|
|
266
277
|
* providers spread across many files to provide configuration information to a common token.
|
|
267
278
|
*/
|
|
268
279
|
multi?: boolean;
|
|
@@ -271,13 +282,11 @@ declare interface ConstructorProvider extends ConstructorSansProvider {
|
|
|
271
282
|
/**
|
|
272
283
|
* Configures the `Injector` to return an instance of a token.
|
|
273
284
|
*
|
|
274
|
-
*
|
|
285
|
+
* @see ["Dependency Injection Guide"](guide/dependency-injection).
|
|
275
286
|
*
|
|
276
287
|
* @usageNotes
|
|
277
288
|
*
|
|
278
|
-
*
|
|
279
|
-
*
|
|
280
|
-
* ```
|
|
289
|
+
* ```ts
|
|
281
290
|
* @Injectable(SomeModule, {deps: []})
|
|
282
291
|
* class MyService {}
|
|
283
292
|
* ```
|
|
@@ -286,8 +295,7 @@ declare interface ConstructorProvider extends ConstructorSansProvider {
|
|
|
286
295
|
*/
|
|
287
296
|
declare interface ConstructorSansProvider {
|
|
288
297
|
/**
|
|
289
|
-
* A list of `token`s
|
|
290
|
-
* used as arguments to the `useClass` constructor.
|
|
298
|
+
* A list of `token`s to be resolved by the injector.
|
|
291
299
|
*/
|
|
292
300
|
deps?: any[];
|
|
293
301
|
}
|
|
@@ -333,27 +341,25 @@ declare class ElementRef<T = any> {
|
|
|
333
341
|
/**
|
|
334
342
|
* Configures the `Injector` to return a value of another `useExisting` token.
|
|
335
343
|
*
|
|
336
|
-
*
|
|
344
|
+
* @see ["Dependency Injection Guide"](guide/dependency-injection).
|
|
337
345
|
*
|
|
338
346
|
* @usageNotes
|
|
339
347
|
*
|
|
340
|
-
*
|
|
341
|
-
*
|
|
342
|
-
* {@example core/di/ts/provider_spec.ts region='ExistingProvider'}
|
|
348
|
+
* {@example core/di/ts/provider_spec.ts region='ExistingProvider' linenums="false"}
|
|
343
349
|
*
|
|
344
350
|
* ### Multi-value example
|
|
345
351
|
*
|
|
346
|
-
* {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
|
|
352
|
+
* {@example core/di/ts/provider_spec.ts region='MultiProviderAspect' linenums="false"}
|
|
347
353
|
*
|
|
348
354
|
* @publicApi
|
|
349
355
|
*/
|
|
350
356
|
declare interface ExistingProvider extends ExistingSansProvider {
|
|
351
357
|
/**
|
|
352
|
-
* An injection token.
|
|
358
|
+
* An injection token. Typically an instance of `Type` or `InjectionToken`, but can be `any`.
|
|
353
359
|
*/
|
|
354
360
|
provide: any;
|
|
355
361
|
/**
|
|
356
|
-
*
|
|
362
|
+
* When true, injector returns an array of instances. This is useful to allow multiple
|
|
357
363
|
* providers spread across many files to provide configuration information to a common token.
|
|
358
364
|
*/
|
|
359
365
|
multi?: boolean;
|
|
@@ -362,41 +368,33 @@ declare interface ExistingProvider extends ExistingSansProvider {
|
|
|
362
368
|
/**
|
|
363
369
|
* Configures the `Injector` to return a value of another `useExisting` token.
|
|
364
370
|
*
|
|
365
|
-
*
|
|
366
|
-
*
|
|
367
|
-
* @usageNotes
|
|
368
|
-
*
|
|
369
|
-
* ### Example
|
|
370
|
-
*
|
|
371
|
-
* {@example core/di/ts/provider_spec.ts region='ExistingSansProvider'}
|
|
371
|
+
* @see `ExistingProvider`
|
|
372
|
+
* @see ["Dependency Injection Guide"](guide/dependency-injection).
|
|
372
373
|
*
|
|
373
374
|
* @publicApi
|
|
374
375
|
*/
|
|
375
376
|
declare interface ExistingSansProvider {
|
|
376
377
|
/**
|
|
377
|
-
* Existing `token` to return. (
|
|
378
|
+
* Existing `token` to return. (Equivalent to `injector.get(useExisting)`)
|
|
378
379
|
*/
|
|
379
380
|
useExisting: any;
|
|
380
381
|
}
|
|
381
382
|
|
|
382
383
|
/**
|
|
383
384
|
* Configures the `Injector` to return a value by invoking a `useFactory` function.
|
|
384
|
-
*
|
|
385
|
-
* For more details, see the ["Dependency Injection Guide"](guide/dependency-injection).
|
|
385
|
+
* @see ["Dependency Injection Guide"](guide/dependency-injection).
|
|
386
386
|
*
|
|
387
387
|
* @usageNotes
|
|
388
388
|
*
|
|
389
|
-
*
|
|
390
|
-
*
|
|
391
|
-
* {@example core/di/ts/provider_spec.ts region='FactoryProvider'}
|
|
389
|
+
* {@example core/di/ts/provider_spec.ts region='FactoryProvider' linenums="false"}
|
|
392
390
|
*
|
|
393
391
|
* Dependencies can also be marked as optional:
|
|
394
392
|
*
|
|
395
|
-
* {@example core/di/ts/provider_spec.ts region='FactoryProviderOptionalDeps'}
|
|
393
|
+
* {@example core/di/ts/provider_spec.ts region='FactoryProviderOptionalDeps' linenums="false"}
|
|
396
394
|
*
|
|
397
395
|
* ### Multi-value example
|
|
398
396
|
*
|
|
399
|
-
* {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
|
|
397
|
+
* {@example core/di/ts/provider_spec.ts region='MultiProviderAspect' linenums="false"}
|
|
400
398
|
*
|
|
401
399
|
* @publicApi
|
|
402
400
|
*/
|
|
@@ -406,7 +404,7 @@ declare interface FactoryProvider extends FactorySansProvider {
|
|
|
406
404
|
*/
|
|
407
405
|
provide: any;
|
|
408
406
|
/**
|
|
409
|
-
*
|
|
407
|
+
* When true, injector returns an array of instances. This is useful to allow multiple
|
|
410
408
|
* providers spread across many files to provide configuration information to a common token.
|
|
411
409
|
*/
|
|
412
410
|
multi?: boolean;
|
|
@@ -415,12 +413,8 @@ declare interface FactoryProvider extends FactorySansProvider {
|
|
|
415
413
|
/**
|
|
416
414
|
* Configures the `Injector` to return a value by invoking a `useFactory` function.
|
|
417
415
|
*
|
|
418
|
-
*
|
|
419
|
-
*
|
|
420
|
-
* @usageNotes
|
|
421
|
-
* ### Example
|
|
422
|
-
*
|
|
423
|
-
* {@example core/di/ts/provider_spec.ts region='FactorySansProvider'}
|
|
416
|
+
* @see `FactoryProvider`
|
|
417
|
+
* @see ["Dependency Injection Guide"](guide/dependency-injection).
|
|
424
418
|
*
|
|
425
419
|
* @publicApi
|
|
426
420
|
*/
|
|
@@ -431,7 +425,7 @@ declare interface FactorySansProvider {
|
|
|
431
425
|
*/
|
|
432
426
|
useFactory: Function;
|
|
433
427
|
/**
|
|
434
|
-
* A list of `token`s
|
|
428
|
+
* A list of `token`s to be resolved by the injector. The list of values is then
|
|
435
429
|
* used as arguments to the `useFactory` function.
|
|
436
430
|
*/
|
|
437
431
|
deps?: any[];
|
|
@@ -717,32 +711,29 @@ export declare function setClassMetadata(type: Type<any>, decorators: any[] | nu
|
|
|
717
711
|
|
|
718
712
|
/**
|
|
719
713
|
* Configures the `Injector` to return an instance of `useClass` for a token.
|
|
720
|
-
*
|
|
721
|
-
* For more details, see the ["Dependency Injection Guide"](guide/dependency-injection).
|
|
714
|
+
* @see ["Dependency Injection Guide"](guide/dependency-injection).
|
|
722
715
|
*
|
|
723
716
|
* @usageNotes
|
|
724
717
|
*
|
|
725
|
-
* ### Example
|
|
726
|
-
*
|
|
727
718
|
* {@example core/di/ts/provider_spec.ts region='StaticClassProvider'}
|
|
728
719
|
*
|
|
729
720
|
* Note that following two providers are not equal:
|
|
730
721
|
*
|
|
731
|
-
* {@example core/di/ts/provider_spec.ts region='StaticClassProviderDifference'}
|
|
722
|
+
* {@example core/di/ts/provider_spec.ts region='StaticClassProviderDifference' linenums="false"}
|
|
732
723
|
*
|
|
733
724
|
* ### Multi-value example
|
|
734
725
|
*
|
|
735
|
-
* {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
|
|
726
|
+
* {@example core/di/ts/provider_spec.ts region='MultiProviderAspect' linenums="false"}
|
|
736
727
|
*
|
|
737
728
|
* @publicApi
|
|
738
729
|
*/
|
|
739
730
|
declare interface StaticClassProvider extends StaticClassSansProvider {
|
|
740
731
|
/**
|
|
741
|
-
* An injection token.
|
|
732
|
+
* An injection token. Typically an instance of `Type` or `InjectionToken`, but can be `any`.
|
|
742
733
|
*/
|
|
743
734
|
provide: any;
|
|
744
735
|
/**
|
|
745
|
-
*
|
|
736
|
+
* When true, injector returns an array of instances. This is useful to allow multiple
|
|
746
737
|
* providers spread across many files to provide configuration information to a common token.
|
|
747
738
|
*/
|
|
748
739
|
multi?: boolean;
|
|
@@ -756,25 +747,20 @@ declare interface StaticClassProvider extends StaticClassSansProvider {
|
|
|
756
747
|
*/
|
|
757
748
|
declare interface StaticClassSansProvider {
|
|
758
749
|
/**
|
|
759
|
-
* An optional class to instantiate for the `token`.
|
|
760
|
-
* class
|
|
750
|
+
* An optional class to instantiate for the `token`. By default, the `provide`
|
|
751
|
+
* class is instantiated.
|
|
761
752
|
*/
|
|
762
753
|
useClass: Type<any>;
|
|
763
754
|
/**
|
|
764
|
-
* A list of `token`s
|
|
755
|
+
* A list of `token`s to be resolved by the injector. The list of values is then
|
|
765
756
|
* used as arguments to the `useClass` constructor.
|
|
766
757
|
*/
|
|
767
758
|
deps: any[];
|
|
768
759
|
}
|
|
769
760
|
|
|
770
761
|
/**
|
|
771
|
-
* Describes how the `Injector` should be configured
|
|
772
|
-
*
|
|
773
|
-
* For more details, see the ["Dependency Injection Guide"](guide/dependency-injection).
|
|
774
|
-
*
|
|
775
|
-
* @see `ValueProvider`
|
|
776
|
-
* @see `ExistingProvider`
|
|
777
|
-
* @see `FactoryProvider`
|
|
762
|
+
* Describes how the `Injector` should be configured as static (that is, without reflection).
|
|
763
|
+
* @see ["Dependency Injection Guide"](guide/dependency-injection).
|
|
778
764
|
*
|
|
779
765
|
* @publicApi
|
|
780
766
|
*/
|
|
@@ -798,28 +784,27 @@ declare interface Type<T> extends Function {
|
|
|
798
784
|
|
|
799
785
|
/**
|
|
800
786
|
* Configures the `Injector` to return a value for a token.
|
|
801
|
-
*
|
|
802
|
-
* For more details, see the ["Dependency Injection Guide"](guide/dependency-injection).
|
|
787
|
+
* @see ["Dependency Injection Guide"](guide/dependency-injection).
|
|
803
788
|
*
|
|
804
789
|
* @usageNotes
|
|
805
790
|
*
|
|
806
791
|
* ### Example
|
|
807
792
|
*
|
|
808
|
-
* {@example core/di/ts/provider_spec.ts region='ValueProvider'}
|
|
793
|
+
* {@example core/di/ts/provider_spec.ts region='ValueProvider' linenums="false"}
|
|
809
794
|
*
|
|
810
795
|
* ### Multi-value example
|
|
811
796
|
*
|
|
812
|
-
* {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
|
|
797
|
+
* {@example core/di/ts/provider_spec.ts region='MultiProviderAspect' linenums="false"}
|
|
813
798
|
*
|
|
814
799
|
* @publicApi
|
|
815
800
|
*/
|
|
816
801
|
declare interface ValueProvider extends ValueSansProvider {
|
|
817
802
|
/**
|
|
818
|
-
* An injection token.
|
|
803
|
+
* An injection token. Typically an instance of `Type` or `InjectionToken`, but can be `any`.
|
|
819
804
|
*/
|
|
820
805
|
provide: any;
|
|
821
806
|
/**
|
|
822
|
-
*
|
|
807
|
+
* When true, injector returns an array of instances. This is useful to allow multiple
|
|
823
808
|
* providers spread across many files to provide configuration information to a common token.
|
|
824
809
|
*/
|
|
825
810
|
multi?: boolean;
|
package/testing/testing.d.ts
CHANGED
package/testing.d.ts
CHANGED