@angular/core 8.1.0-next.2 → 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.js.map +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 +394 -279
- package/bundles/core.umd.js.map +1 -1
- package/bundles/core.umd.min.js +101 -101
- package/bundles/core.umd.min.js.map +1 -1
- package/core.d.ts +221 -234
- package/core.metadata.json +1 -1
- package/esm2015/index.js +2 -2
- package/esm2015/public_api.js +2 -2
- package/esm2015/src/change_detection/pipe_transform.js +4 -6
- package/esm2015/src/core.js +2 -2
- package/esm2015/src/core_render3_private_export.js +2 -2
- 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/reflection/reflection_capabilities.js +2 -2
- package/esm2015/src/render3/component.js +6 -2
- package/esm2015/src/render3/component_ref.js +18 -13
- package/esm2015/src/render3/di.js +4 -6
- package/esm2015/src/render3/features/providers_feature.js +6 -3
- package/esm2015/src/render3/i18n.js +20 -13
- package/esm2015/src/render3/index.js +2 -2
- package/esm2015/src/render3/instructions/all.js +2 -2
- package/esm2015/src/render3/instructions/attribute.js +5 -4
- package/esm2015/src/render3/instructions/embedded_view.js +5 -2
- package/esm2015/src/render3/instructions/property.js +9 -8
- package/esm2015/src/render3/instructions/shared.js +36 -5
- package/esm2015/src/render3/instructions/text.js +15 -20
- package/esm2015/src/render3/instructions/text_interpolation.js +67 -12
- package/esm2015/src/render3/interfaces/container.js +6 -2
- package/esm2015/src/render3/interfaces/i18n.js +1 -17
- package/esm2015/src/render3/interfaces/node.js +2 -2
- package/esm2015/src/render3/interfaces/view.js +2 -2
- package/esm2015/src/render3/jit/environment.js +1 -2
- package/esm2015/src/render3/node_manipulation.js +235 -197
- package/esm2015/src/render3/query.js +12 -8
- package/esm2015/src/render3/state.js +6 -3
- package/esm2015/src/render3/util/misc_utils.js +1 -1
- package/esm2015/src/render3/util/view_traversal_utils.js +7 -2
- package/esm2015/src/render3/view_engine_compatibility.js +39 -12
- package/esm2015/src/util/assert.js +3 -2
- package/esm2015/src/util/decorators.js +1 -1
- package/esm2015/src/version.js +1 -1
- package/esm2015/testing/src/test_bed_common.js +5 -2
- package/esm5/src/change_detection/pipe_transform.js +1 -1
- package/esm5/src/core_render3_private_export.js +2 -2
- 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/reflection/reflection_capabilities.js +2 -2
- package/esm5/src/render3/component.js +5 -2
- package/esm5/src/render3/component_ref.js +13 -9
- package/esm5/src/render3/di.js +4 -5
- package/esm5/src/render3/features/providers_feature.js +6 -3
- package/esm5/src/render3/i18n.js +15 -10
- package/esm5/src/render3/index.js +2 -2
- package/esm5/src/render3/instructions/attribute.js +5 -4
- package/esm5/src/render3/instructions/embedded_view.js +5 -2
- package/esm5/src/render3/instructions/property.js +7 -7
- package/esm5/src/render3/instructions/shared.js +27 -5
- package/esm5/src/render3/instructions/text.js +12 -17
- package/esm5/src/render3/instructions/text_interpolation.js +49 -12
- package/esm5/src/render3/interfaces/container.js +3 -2
- package/esm5/src/render3/interfaces/i18n.js +1 -1
- package/esm5/src/render3/interfaces/node.js +1 -1
- package/esm5/src/render3/interfaces/view.js +1 -1
- package/esm5/src/render3/jit/environment.js +1 -2
- package/esm5/src/render3/node_manipulation.js +200 -192
- package/esm5/src/render3/query.js +10 -8
- package/esm5/src/render3/state.js +6 -3
- package/esm5/src/render3/util/misc_utils.js +1 -1
- package/esm5/src/render3/util/view_traversal_utils.js +7 -2
- package/esm5/src/render3/view_engine_compatibility.js +32 -12
- package/esm5/src/util/assert.js +3 -2
- package/esm5/src/util/decorators.js +1 -1
- package/esm5/src/version.js +1 -1
- package/esm5/testing/src/test_bed_common.js +1 -1
- package/fesm2015/core.js +483 -296
- package/fesm2015/core.js.map +1 -1
- package/fesm2015/testing.js +1 -1
- package/fesm2015/testing.js.map +1 -1
- package/fesm5/core.js +395 -279
- package/fesm5/core.js.map +1 -1
- package/fesm5/testing.js +1 -1
- package/fesm5/testing.js.map +1 -1
- package/package.json +1 -1
- package/src/r3_symbols.d.ts +73 -90
- package/testing/testing.d.ts +5 -2
- package/testing.d.ts +1 -1
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,21 +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
|
-
* ### Example
|
|
111
109
|
*
|
|
112
|
-
* {@example core/di/ts/provider_spec.ts region='ClassProvider'}
|
|
110
|
+
* {@example core/di/ts/provider_spec.ts region='ClassProvider' linenums="false"}
|
|
113
111
|
*
|
|
114
112
|
* Note that following two providers are not equal:
|
|
115
113
|
*
|
|
116
|
-
* {@example core/di/ts/provider_spec.ts region='ClassProviderDifference'}
|
|
114
|
+
* {@example core/di/ts/provider_spec.ts region='ClassProviderDifference' linenums="false"}
|
|
117
115
|
*
|
|
118
116
|
* ### Multi-value example
|
|
119
117
|
*
|
|
120
|
-
* {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
|
|
118
|
+
* {@example core/di/ts/provider_spec.ts region='MultiProviderAspect' linenums="false"}
|
|
121
119
|
*
|
|
122
120
|
* @publicApi
|
|
123
121
|
*/
|
|
@@ -127,7 +125,7 @@ declare interface ClassProvider extends ClassSansProvider {
|
|
|
127
125
|
*/
|
|
128
126
|
provide: any;
|
|
129
127
|
/**
|
|
130
|
-
*
|
|
128
|
+
* When true, injector returns an array of instances. This is useful to allow multiple
|
|
131
129
|
* providers spread across many files to provide configuration information to a common token.
|
|
132
130
|
*/
|
|
133
131
|
multi?: boolean;
|
|
@@ -135,13 +133,9 @@ declare interface ClassProvider extends ClassSansProvider {
|
|
|
135
133
|
|
|
136
134
|
/**
|
|
137
135
|
* Configures the `Injector` to return a value by invoking a `useClass` function.
|
|
136
|
+
* Base for `ClassProvider` decorator.
|
|
138
137
|
*
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
-
* @usageNotes
|
|
142
|
-
* ### Example
|
|
143
|
-
*
|
|
144
|
-
* {@example core/di/ts/provider_spec.ts region='ClassSansProvider'}
|
|
138
|
+
* @see ["Dependency Injection Guide"](guide/dependency-injection).
|
|
145
139
|
*
|
|
146
140
|
* @publicApi
|
|
147
141
|
*/
|
|
@@ -153,6 +147,12 @@ declare interface ClassSansProvider {
|
|
|
153
147
|
}
|
|
154
148
|
|
|
155
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
|
+
*
|
|
156
156
|
* @publicApi
|
|
157
157
|
*/
|
|
158
158
|
declare abstract class ComponentFactory<C> {
|
|
@@ -161,7 +161,7 @@ declare abstract class ComponentFactory<C> {
|
|
|
161
161
|
*/
|
|
162
162
|
abstract readonly selector: string;
|
|
163
163
|
/**
|
|
164
|
-
* The component
|
|
164
|
+
* The type of component the factory will create.
|
|
165
165
|
*/
|
|
166
166
|
abstract readonly componentType: Type<any>;
|
|
167
167
|
/**
|
|
@@ -189,10 +189,20 @@ declare abstract class ComponentFactory<C> {
|
|
|
189
189
|
}
|
|
190
190
|
|
|
191
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)
|
|
192
198
|
* @publicApi
|
|
193
199
|
*/
|
|
194
200
|
declare abstract class ComponentFactoryResolver {
|
|
195
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
|
+
*/
|
|
196
206
|
abstract resolveComponentFactory<T>(component: Type<T>): ComponentFactory<T>;
|
|
197
207
|
}
|
|
198
208
|
|
|
@@ -226,7 +236,7 @@ declare abstract class ComponentRef<C> {
|
|
|
226
236
|
*/
|
|
227
237
|
abstract readonly changeDetectorRef: ChangeDetectorRef;
|
|
228
238
|
/**
|
|
229
|
-
* The component
|
|
239
|
+
* The type of this component (as created by a `ComponentFactory` class).
|
|
230
240
|
*/
|
|
231
241
|
abstract readonly componentType: Type<any>;
|
|
232
242
|
/**
|
|
@@ -245,24 +255,25 @@ declare abstract class ComponentRef<C> {
|
|
|
245
255
|
/**
|
|
246
256
|
* Configures the `Injector` to return an instance of a token.
|
|
247
257
|
*
|
|
248
|
-
*
|
|
258
|
+
* @see ["Dependency Injection Guide"](guide/dependency-injection).
|
|
249
259
|
*
|
|
250
260
|
* @usageNotes
|
|
251
|
-
* ### Example
|
|
252
261
|
*
|
|
253
|
-
* {@example core/di/ts/provider_spec.ts region='ConstructorProvider'}
|
|
262
|
+
* {@example core/di/ts/provider_spec.ts region='ConstructorProvider' linenums="false"}
|
|
254
263
|
*
|
|
255
264
|
* ### Multi-value example
|
|
256
265
|
*
|
|
257
|
-
* {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
|
|
266
|
+
* {@example core/di/ts/provider_spec.ts region='MultiProviderAspect' linenums="false"}
|
|
267
|
+
*
|
|
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,12 +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
|
-
* ### Example
|
|
278
288
|
*
|
|
279
|
-
* ```
|
|
289
|
+
* ```ts
|
|
280
290
|
* @Injectable(SomeModule, {deps: []})
|
|
281
291
|
* class MyService {}
|
|
282
292
|
* ```
|
|
@@ -285,8 +295,7 @@ declare interface ConstructorProvider extends ConstructorSansProvider {
|
|
|
285
295
|
*/
|
|
286
296
|
declare interface ConstructorSansProvider {
|
|
287
297
|
/**
|
|
288
|
-
* A list of `token`s
|
|
289
|
-
* used as arguments to the `useClass` constructor.
|
|
298
|
+
* A list of `token`s to be resolved by the injector.
|
|
290
299
|
*/
|
|
291
300
|
deps?: any[];
|
|
292
301
|
}
|
|
@@ -332,26 +341,25 @@ declare class ElementRef<T = any> {
|
|
|
332
341
|
/**
|
|
333
342
|
* Configures the `Injector` to return a value of another `useExisting` token.
|
|
334
343
|
*
|
|
335
|
-
*
|
|
344
|
+
* @see ["Dependency Injection Guide"](guide/dependency-injection).
|
|
336
345
|
*
|
|
337
346
|
* @usageNotes
|
|
338
|
-
* ### Example
|
|
339
347
|
*
|
|
340
|
-
* {@example core/di/ts/provider_spec.ts region='ExistingProvider'}
|
|
348
|
+
* {@example core/di/ts/provider_spec.ts region='ExistingProvider' linenums="false"}
|
|
341
349
|
*
|
|
342
350
|
* ### Multi-value example
|
|
343
351
|
*
|
|
344
|
-
* {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
|
|
352
|
+
* {@example core/di/ts/provider_spec.ts region='MultiProviderAspect' linenums="false"}
|
|
345
353
|
*
|
|
346
354
|
* @publicApi
|
|
347
355
|
*/
|
|
348
356
|
declare interface ExistingProvider extends ExistingSansProvider {
|
|
349
357
|
/**
|
|
350
|
-
* An injection token.
|
|
358
|
+
* An injection token. Typically an instance of `Type` or `InjectionToken`, but can be `any`.
|
|
351
359
|
*/
|
|
352
360
|
provide: any;
|
|
353
361
|
/**
|
|
354
|
-
*
|
|
362
|
+
* When true, injector returns an array of instances. This is useful to allow multiple
|
|
355
363
|
* providers spread across many files to provide configuration information to a common token.
|
|
356
364
|
*/
|
|
357
365
|
multi?: boolean;
|
|
@@ -360,37 +368,33 @@ declare interface ExistingProvider extends ExistingSansProvider {
|
|
|
360
368
|
/**
|
|
361
369
|
* Configures the `Injector` to return a value of another `useExisting` token.
|
|
362
370
|
*
|
|
363
|
-
*
|
|
364
|
-
*
|
|
365
|
-
* @usageNotes
|
|
366
|
-
* ### Example
|
|
371
|
+
* @see `ExistingProvider`
|
|
372
|
+
* @see ["Dependency Injection Guide"](guide/dependency-injection).
|
|
367
373
|
*
|
|
368
|
-
*
|
|
374
|
+
* @publicApi
|
|
369
375
|
*/
|
|
370
376
|
declare interface ExistingSansProvider {
|
|
371
377
|
/**
|
|
372
|
-
* Existing `token` to return. (
|
|
378
|
+
* Existing `token` to return. (Equivalent to `injector.get(useExisting)`)
|
|
373
379
|
*/
|
|
374
380
|
useExisting: any;
|
|
375
381
|
}
|
|
376
382
|
|
|
377
383
|
/**
|
|
378
384
|
* Configures the `Injector` to return a value by invoking a `useFactory` function.
|
|
379
|
-
*
|
|
380
|
-
* For more details, see the ["Dependency Injection Guide"](guide/dependency-injection).
|
|
385
|
+
* @see ["Dependency Injection Guide"](guide/dependency-injection).
|
|
381
386
|
*
|
|
382
387
|
* @usageNotes
|
|
383
|
-
* ### Example
|
|
384
388
|
*
|
|
385
|
-
* {@example core/di/ts/provider_spec.ts region='FactoryProvider'}
|
|
389
|
+
* {@example core/di/ts/provider_spec.ts region='FactoryProvider' linenums="false"}
|
|
386
390
|
*
|
|
387
391
|
* Dependencies can also be marked as optional:
|
|
388
392
|
*
|
|
389
|
-
* {@example core/di/ts/provider_spec.ts region='FactoryProviderOptionalDeps'}
|
|
393
|
+
* {@example core/di/ts/provider_spec.ts region='FactoryProviderOptionalDeps' linenums="false"}
|
|
390
394
|
*
|
|
391
395
|
* ### Multi-value example
|
|
392
396
|
*
|
|
393
|
-
* {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
|
|
397
|
+
* {@example core/di/ts/provider_spec.ts region='MultiProviderAspect' linenums="false"}
|
|
394
398
|
*
|
|
395
399
|
* @publicApi
|
|
396
400
|
*/
|
|
@@ -400,7 +404,7 @@ declare interface FactoryProvider extends FactorySansProvider {
|
|
|
400
404
|
*/
|
|
401
405
|
provide: any;
|
|
402
406
|
/**
|
|
403
|
-
*
|
|
407
|
+
* When true, injector returns an array of instances. This is useful to allow multiple
|
|
404
408
|
* providers spread across many files to provide configuration information to a common token.
|
|
405
409
|
*/
|
|
406
410
|
multi?: boolean;
|
|
@@ -409,12 +413,8 @@ declare interface FactoryProvider extends FactorySansProvider {
|
|
|
409
413
|
/**
|
|
410
414
|
* Configures the `Injector` to return a value by invoking a `useFactory` function.
|
|
411
415
|
*
|
|
412
|
-
*
|
|
413
|
-
*
|
|
414
|
-
* @usageNotes
|
|
415
|
-
* ### Example
|
|
416
|
-
*
|
|
417
|
-
* {@example core/di/ts/provider_spec.ts region='FactorySansProvider'}
|
|
416
|
+
* @see `FactoryProvider`
|
|
417
|
+
* @see ["Dependency Injection Guide"](guide/dependency-injection).
|
|
418
418
|
*
|
|
419
419
|
* @publicApi
|
|
420
420
|
*/
|
|
@@ -425,7 +425,7 @@ declare interface FactorySansProvider {
|
|
|
425
425
|
*/
|
|
426
426
|
useFactory: Function;
|
|
427
427
|
/**
|
|
428
|
-
* A list of `token`s
|
|
428
|
+
* A list of `token`s to be resolved by the injector. The list of values is then
|
|
429
429
|
* used as arguments to the `useFactory` function.
|
|
430
430
|
*/
|
|
431
431
|
deps?: any[];
|
|
@@ -711,29 +711,29 @@ export declare function setClassMetadata(type: Type<any>, decorators: any[] | nu
|
|
|
711
711
|
|
|
712
712
|
/**
|
|
713
713
|
* Configures the `Injector` to return an instance of `useClass` for a token.
|
|
714
|
-
*
|
|
715
|
-
* For more details, see the ["Dependency Injection Guide"](guide/dependency-injection).
|
|
714
|
+
* @see ["Dependency Injection Guide"](guide/dependency-injection).
|
|
716
715
|
*
|
|
717
716
|
* @usageNotes
|
|
718
|
-
* ### Example
|
|
719
717
|
*
|
|
720
718
|
* {@example core/di/ts/provider_spec.ts region='StaticClassProvider'}
|
|
721
719
|
*
|
|
722
720
|
* Note that following two providers are not equal:
|
|
723
721
|
*
|
|
724
|
-
* {@example core/di/ts/provider_spec.ts region='StaticClassProviderDifference'}
|
|
722
|
+
* {@example core/di/ts/provider_spec.ts region='StaticClassProviderDifference' linenums="false"}
|
|
725
723
|
*
|
|
726
724
|
* ### Multi-value example
|
|
727
725
|
*
|
|
728
|
-
* {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
|
|
726
|
+
* {@example core/di/ts/provider_spec.ts region='MultiProviderAspect' linenums="false"}
|
|
727
|
+
*
|
|
728
|
+
* @publicApi
|
|
729
729
|
*/
|
|
730
730
|
declare interface StaticClassProvider extends StaticClassSansProvider {
|
|
731
731
|
/**
|
|
732
|
-
* An injection token.
|
|
732
|
+
* An injection token. Typically an instance of `Type` or `InjectionToken`, but can be `any`.
|
|
733
733
|
*/
|
|
734
734
|
provide: any;
|
|
735
735
|
/**
|
|
736
|
-
*
|
|
736
|
+
* When true, injector returns an array of instances. This is useful to allow multiple
|
|
737
737
|
* providers spread across many files to provide configuration information to a common token.
|
|
738
738
|
*/
|
|
739
739
|
multi?: boolean;
|
|
@@ -741,37 +741,26 @@ declare interface StaticClassProvider extends StaticClassSansProvider {
|
|
|
741
741
|
|
|
742
742
|
/**
|
|
743
743
|
* Configures the `Injector` to return an instance of `useClass` for a token.
|
|
744
|
-
*
|
|
745
|
-
* For more details, see the ["Dependency Injection Guide"](guide/dependency-injection).
|
|
746
|
-
*
|
|
747
|
-
* @usageNotes
|
|
748
|
-
* ### Example
|
|
749
|
-
*
|
|
750
|
-
* {@example core/di/ts/provider_spec.ts region='StaticClassSansProvider'}
|
|
744
|
+
* Base for `StaticClassProvider` decorator.
|
|
751
745
|
*
|
|
752
746
|
* @publicApi
|
|
753
747
|
*/
|
|
754
748
|
declare interface StaticClassSansProvider {
|
|
755
749
|
/**
|
|
756
|
-
* An optional class to instantiate for the `token`.
|
|
757
|
-
* class
|
|
750
|
+
* An optional class to instantiate for the `token`. By default, the `provide`
|
|
751
|
+
* class is instantiated.
|
|
758
752
|
*/
|
|
759
753
|
useClass: Type<any>;
|
|
760
754
|
/**
|
|
761
|
-
* A list of `token`s
|
|
755
|
+
* A list of `token`s to be resolved by the injector. The list of values is then
|
|
762
756
|
* used as arguments to the `useClass` constructor.
|
|
763
757
|
*/
|
|
764
758
|
deps: any[];
|
|
765
759
|
}
|
|
766
760
|
|
|
767
761
|
/**
|
|
768
|
-
* Describes how the `Injector` should be configured
|
|
769
|
-
*
|
|
770
|
-
* For more details, see the ["Dependency Injection Guide"](guide/dependency-injection).
|
|
771
|
-
*
|
|
772
|
-
* @see `ValueProvider`
|
|
773
|
-
* @see `ExistingProvider`
|
|
774
|
-
* @see `FactoryProvider`
|
|
762
|
+
* Describes how the `Injector` should be configured as static (that is, without reflection).
|
|
763
|
+
* @see ["Dependency Injection Guide"](guide/dependency-injection).
|
|
775
764
|
*
|
|
776
765
|
* @publicApi
|
|
777
766
|
*/
|
|
@@ -795,27 +784,27 @@ declare interface Type<T> extends Function {
|
|
|
795
784
|
|
|
796
785
|
/**
|
|
797
786
|
* Configures the `Injector` to return a value for a token.
|
|
798
|
-
*
|
|
799
|
-
* For more details, see the ["Dependency Injection Guide"](guide/dependency-injection).
|
|
787
|
+
* @see ["Dependency Injection Guide"](guide/dependency-injection).
|
|
800
788
|
*
|
|
801
789
|
* @usageNotes
|
|
790
|
+
*
|
|
802
791
|
* ### Example
|
|
803
792
|
*
|
|
804
|
-
* {@example core/di/ts/provider_spec.ts region='ValueProvider'}
|
|
793
|
+
* {@example core/di/ts/provider_spec.ts region='ValueProvider' linenums="false"}
|
|
805
794
|
*
|
|
806
795
|
* ### Multi-value example
|
|
807
796
|
*
|
|
808
|
-
* {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
|
|
797
|
+
* {@example core/di/ts/provider_spec.ts region='MultiProviderAspect' linenums="false"}
|
|
809
798
|
*
|
|
810
799
|
* @publicApi
|
|
811
800
|
*/
|
|
812
801
|
declare interface ValueProvider extends ValueSansProvider {
|
|
813
802
|
/**
|
|
814
|
-
* An injection token.
|
|
803
|
+
* An injection token. Typically an instance of `Type` or `InjectionToken`, but can be `any`.
|
|
815
804
|
*/
|
|
816
805
|
provide: any;
|
|
817
806
|
/**
|
|
818
|
-
*
|
|
807
|
+
* When true, injector returns an array of instances. This is useful to allow multiple
|
|
819
808
|
* providers spread across many files to provide configuration information to a common token.
|
|
820
809
|
*/
|
|
821
810
|
multi?: boolean;
|
|
@@ -823,13 +812,7 @@ declare interface ValueProvider extends ValueSansProvider {
|
|
|
823
812
|
|
|
824
813
|
/**
|
|
825
814
|
* Configures the `Injector` to return a value for a token.
|
|
826
|
-
*
|
|
827
|
-
* For more details, see the ["Dependency Injection Guide"](guide/dependency-injection).
|
|
828
|
-
*
|
|
829
|
-
* @usageNotes
|
|
830
|
-
* ### Example
|
|
831
|
-
*
|
|
832
|
-
* {@example core/di/ts/provider_spec.ts region='ValueSansProvider'}
|
|
815
|
+
* Base for `ValueProvider` decorator.
|
|
833
816
|
*
|
|
834
817
|
* @publicApi
|
|
835
818
|
*/
|
package/testing/testing.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
|
*/
|
|
@@ -383,7 +383,10 @@ export declare interface TestBedStatic {
|
|
|
383
383
|
}): TestBedStatic;
|
|
384
384
|
get<T>(token: Type<T> | InjectionToken<T>, notFoundValue?: T, flags?: InjectFlags): any;
|
|
385
385
|
/**
|
|
386
|
-
*
|
|
386
|
+
* deprecated from v8.0.0 use Type<T> or InjectionToken<T>
|
|
387
|
+
* This does not use the deprecated jsdoc tag on purpose
|
|
388
|
+
* because it renders all overloads as deprecated in TSLint
|
|
389
|
+
* due to https://github.com/palantir/tslint/issues/4522.
|
|
387
390
|
*/
|
|
388
391
|
get(token: any, notFoundValue?: any): any;
|
|
389
392
|
createComponent<T>(component: Type<T>): ComponentFixture<T>;
|
package/testing.d.ts
CHANGED