static-injector 5.0.1 → 5.0.2
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/commonjs/index.js +17 -7
- package/es2022/di/injector.js +3 -3
- package/es2022/di/injector_compatibility.js +2 -2
- package/es2022/di/metadata.js +0 -1
- package/es2022/di/provider_collection.js +1 -1
- package/es2022/index.js +8 -0
- package/fesm2022/index.js +16 -8
- package/package.json +2 -2
- package/readme.md +1 -1
- package/typings/di/injectable.d.ts +2 -2
- package/typings/di/injector.d.ts +3 -3
- package/typings/di/interface/provider.d.ts +15 -17
- package/typings/di/metadata.d.ts +4 -4
- package/typings/di/provider_collection.d.ts +1 -1
- package/typings/errors.d.ts +4 -0
- package/typings/index.d.ts +7 -0
- package/typings/interface/lifecycle_hooks.d.ts +1 -1
package/commonjs/index.js
CHANGED
|
@@ -499,8 +499,8 @@ function ɵɵinvalidFactoryDep(index) {
|
|
|
499
499
|
*/
|
|
500
500
|
/**
|
|
501
501
|
* Injects a token from the currently active injector.
|
|
502
|
-
* `inject` is only supported in an [injection context](
|
|
503
|
-
* be used during:
|
|
502
|
+
* `inject` is only supported in an [injection context](guide/di/dependency-injection-context). It
|
|
503
|
+
* can be used during:
|
|
504
504
|
* - Construction (via the `constructor`) of a class being instantiated by the DI system, such
|
|
505
505
|
* as an `@Injectable` or `@Component`.
|
|
506
506
|
* - In the initializer for fields of such classes.
|
|
@@ -690,7 +690,6 @@ function formatError(text, obj, injectorErrorName, source = null) {
|
|
|
690
690
|
*/
|
|
691
691
|
const Inject = attachInjectFlag(
|
|
692
692
|
// Disable tslint because `DecoratorFlags` is a const enum which gets inlined.
|
|
693
|
-
// tslint:disable-next-line: no-toplevel-property-access
|
|
694
693
|
makeParamDecorator('Inject', (token) => ({ token })), -1 /* DecoratorFlags.Inject */);
|
|
695
694
|
/**
|
|
696
695
|
* Optional decorator and metadata.
|
|
@@ -950,7 +949,7 @@ class NullInjector {
|
|
|
950
949
|
* providers.
|
|
951
950
|
*
|
|
952
951
|
* More information about standalone components can be found in [this
|
|
953
|
-
* guide](guide/
|
|
952
|
+
* guide](guide/components/importing).
|
|
954
953
|
*
|
|
955
954
|
* @usageNotes
|
|
956
955
|
* The results of the `importProvidersFrom` call can be used in the `bootstrapApplication` call:
|
|
@@ -1467,10 +1466,10 @@ function createInjectorWithoutInjectorInstances(defType, parent = null, addition
|
|
|
1467
1466
|
*/
|
|
1468
1467
|
/**
|
|
1469
1468
|
* Concrete injectors implement this interface. Injectors are configured
|
|
1470
|
-
* with [providers](guide/dependency-injection-providers) that associate
|
|
1471
|
-
* dependencies of various types with [injection tokens](guide/dependency-injection-providers).
|
|
1469
|
+
* with [providers](guide/di/dependency-injection-providers) that associate
|
|
1470
|
+
* dependencies of various types with [injection tokens](guide/di/dependency-injection-providers).
|
|
1472
1471
|
*
|
|
1473
|
-
* @see [DI Providers](guide/dependency-injection-providers).
|
|
1472
|
+
* @see [DI Providers](guide/di/dependency-injection-providers).
|
|
1474
1473
|
* @see {@link StaticProvider}
|
|
1475
1474
|
*
|
|
1476
1475
|
* @usageNotes
|
|
@@ -1538,6 +1537,15 @@ function ɵɵinvalidFactory() {
|
|
|
1538
1537
|
throw new Error(msg);
|
|
1539
1538
|
}
|
|
1540
1539
|
|
|
1540
|
+
class StaticInjectOptions {
|
|
1541
|
+
static injectOptions;
|
|
1542
|
+
}
|
|
1543
|
+
class RootStaticInjectOptions {
|
|
1544
|
+
static injectOptions = {
|
|
1545
|
+
providedIn: 'root',
|
|
1546
|
+
};
|
|
1547
|
+
}
|
|
1548
|
+
|
|
1541
1549
|
exports.EnvironmentInjector = EnvironmentInjector;
|
|
1542
1550
|
exports.INJECTOR_SCOPE = INJECTOR_SCOPE;
|
|
1543
1551
|
exports.Inject = Inject;
|
|
@@ -1549,9 +1557,11 @@ exports.NG_TEMP_TOKEN_PATH = NG_TEMP_TOKEN_PATH;
|
|
|
1549
1557
|
exports.NullInjector = NullInjector;
|
|
1550
1558
|
exports.Optional = Optional;
|
|
1551
1559
|
exports.R3Injector = R3Injector;
|
|
1560
|
+
exports.RootStaticInjectOptions = RootStaticInjectOptions;
|
|
1552
1561
|
exports.SOURCE = SOURCE;
|
|
1553
1562
|
exports.Self = Self;
|
|
1554
1563
|
exports.SkipSelf = SkipSelf;
|
|
1564
|
+
exports.StaticInjectOptions = StaticInjectOptions;
|
|
1555
1565
|
exports.THROW_IF_NOT_FOUND = THROW_IF_NOT_FOUND;
|
|
1556
1566
|
exports.attachInjectFlag = attachInjectFlag;
|
|
1557
1567
|
exports.catchInjectorError = catchInjectorError;
|
package/es2022/di/injector.js
CHANGED
|
@@ -12,10 +12,10 @@ import { ɵɵdefineInjectable } from './interface/defs';
|
|
|
12
12
|
import { NullInjector } from './null_injector';
|
|
13
13
|
/**
|
|
14
14
|
* Concrete injectors implement this interface. Injectors are configured
|
|
15
|
-
* with [providers](guide/dependency-injection-providers) that associate
|
|
16
|
-
* dependencies of various types with [injection tokens](guide/dependency-injection-providers).
|
|
15
|
+
* with [providers](guide/di/dependency-injection-providers) that associate
|
|
16
|
+
* dependencies of various types with [injection tokens](guide/di/dependency-injection-providers).
|
|
17
17
|
*
|
|
18
|
-
* @see [DI Providers](guide/dependency-injection-providers).
|
|
18
|
+
* @see [DI Providers](guide/di/dependency-injection-providers).
|
|
19
19
|
* @see {@link StaticProvider}
|
|
20
20
|
*
|
|
21
21
|
* @usageNotes
|
|
@@ -88,8 +88,8 @@ export function ɵɵinvalidFactoryDep(index) {
|
|
|
88
88
|
*/
|
|
89
89
|
/**
|
|
90
90
|
* Injects a token from the currently active injector.
|
|
91
|
-
* `inject` is only supported in an [injection context](
|
|
92
|
-
* be used during:
|
|
91
|
+
* `inject` is only supported in an [injection context](guide/di/dependency-injection-context). It
|
|
92
|
+
* can be used during:
|
|
93
93
|
* - Construction (via the `constructor`) of a class being instantiated by the DI system, such
|
|
94
94
|
* as an `@Injectable` or `@Component`.
|
|
95
95
|
* - In the initializer for fields of such classes.
|
package/es2022/di/metadata.js
CHANGED
|
@@ -15,7 +15,6 @@ import { attachInjectFlag } from './injector_compatibility';
|
|
|
15
15
|
*/
|
|
16
16
|
export const Inject = attachInjectFlag(
|
|
17
17
|
// Disable tslint because `DecoratorFlags` is a const enum which gets inlined.
|
|
18
|
-
// tslint:disable-next-line: no-toplevel-property-access
|
|
19
18
|
makeParamDecorator('Inject', (token) => ({ token })), -1 /* DecoratorFlags.Inject */);
|
|
20
19
|
/**
|
|
21
20
|
* Optional decorator and metadata.
|
|
@@ -24,7 +24,7 @@ export function makeEnvironmentProviders(providers) {
|
|
|
24
24
|
* providers.
|
|
25
25
|
*
|
|
26
26
|
* More information about standalone components can be found in [this
|
|
27
|
-
* guide](guide/
|
|
27
|
+
* guide](guide/components/importing).
|
|
28
28
|
*
|
|
29
29
|
* @usageNotes
|
|
30
30
|
* The results of the `importProvidersFrom` call can be used in the `bootstrapApplication` call:
|
package/es2022/index.js
CHANGED
|
@@ -9,3 +9,11 @@ export * from './di/injector';
|
|
|
9
9
|
export * from './di/interface/injector';
|
|
10
10
|
export * from './di/scope';
|
|
11
11
|
export * from './render3/instructions/di';
|
|
12
|
+
export class StaticInjectOptions {
|
|
13
|
+
static injectOptions;
|
|
14
|
+
}
|
|
15
|
+
export class RootStaticInjectOptions {
|
|
16
|
+
static injectOptions = {
|
|
17
|
+
providedIn: 'root',
|
|
18
|
+
};
|
|
19
|
+
}
|
package/fesm2022/index.js
CHANGED
|
@@ -497,8 +497,8 @@ function ɵɵinvalidFactoryDep(index) {
|
|
|
497
497
|
*/
|
|
498
498
|
/**
|
|
499
499
|
* Injects a token from the currently active injector.
|
|
500
|
-
* `inject` is only supported in an [injection context](
|
|
501
|
-
* be used during:
|
|
500
|
+
* `inject` is only supported in an [injection context](guide/di/dependency-injection-context). It
|
|
501
|
+
* can be used during:
|
|
502
502
|
* - Construction (via the `constructor`) of a class being instantiated by the DI system, such
|
|
503
503
|
* as an `@Injectable` or `@Component`.
|
|
504
504
|
* - In the initializer for fields of such classes.
|
|
@@ -688,7 +688,6 @@ function formatError(text, obj, injectorErrorName, source = null) {
|
|
|
688
688
|
*/
|
|
689
689
|
const Inject = attachInjectFlag(
|
|
690
690
|
// Disable tslint because `DecoratorFlags` is a const enum which gets inlined.
|
|
691
|
-
// tslint:disable-next-line: no-toplevel-property-access
|
|
692
691
|
makeParamDecorator('Inject', (token) => ({ token })), -1 /* DecoratorFlags.Inject */);
|
|
693
692
|
/**
|
|
694
693
|
* Optional decorator and metadata.
|
|
@@ -948,7 +947,7 @@ class NullInjector {
|
|
|
948
947
|
* providers.
|
|
949
948
|
*
|
|
950
949
|
* More information about standalone components can be found in [this
|
|
951
|
-
* guide](guide/
|
|
950
|
+
* guide](guide/components/importing).
|
|
952
951
|
*
|
|
953
952
|
* @usageNotes
|
|
954
953
|
* The results of the `importProvidersFrom` call can be used in the `bootstrapApplication` call:
|
|
@@ -1465,10 +1464,10 @@ function createInjectorWithoutInjectorInstances(defType, parent = null, addition
|
|
|
1465
1464
|
*/
|
|
1466
1465
|
/**
|
|
1467
1466
|
* Concrete injectors implement this interface. Injectors are configured
|
|
1468
|
-
* with [providers](guide/dependency-injection-providers) that associate
|
|
1469
|
-
* dependencies of various types with [injection tokens](guide/dependency-injection-providers).
|
|
1467
|
+
* with [providers](guide/di/dependency-injection-providers) that associate
|
|
1468
|
+
* dependencies of various types with [injection tokens](guide/di/dependency-injection-providers).
|
|
1470
1469
|
*
|
|
1471
|
-
* @see [DI Providers](guide/dependency-injection-providers).
|
|
1470
|
+
* @see [DI Providers](guide/di/dependency-injection-providers).
|
|
1472
1471
|
* @see {@link StaticProvider}
|
|
1473
1472
|
*
|
|
1474
1473
|
* @usageNotes
|
|
@@ -1536,4 +1535,13 @@ function ɵɵinvalidFactory() {
|
|
|
1536
1535
|
throw new Error(msg);
|
|
1537
1536
|
}
|
|
1538
1537
|
|
|
1539
|
-
|
|
1538
|
+
class StaticInjectOptions {
|
|
1539
|
+
static injectOptions;
|
|
1540
|
+
}
|
|
1541
|
+
class RootStaticInjectOptions {
|
|
1542
|
+
static injectOptions = {
|
|
1543
|
+
providedIn: 'root',
|
|
1544
|
+
};
|
|
1545
|
+
}
|
|
1546
|
+
|
|
1547
|
+
export { EnvironmentInjector, INJECTOR_SCOPE, Inject, InjectFlags, InjectionToken, Injector, NG_INJ_DEF, NG_PROV_DEF, NG_TEMP_TOKEN_PATH, NullInjector, Optional, R3Injector, RootStaticInjectOptions, SOURCE, Self, SkipSelf, StaticInjectOptions, THROW_IF_NOT_FOUND, attachInjectFlag, catchInjectorError, convertToBitFlags, formatError, getCurrentInjector, getInheritedInjectableDef, getInjectFlag, getInjectableDef, getInjectorDef, getNullInjector, inject, injectArgs, injectInjectorOnly, isInjectable, providerToFactory, setCurrentInjector, ɵɵdefineInjectable, ɵɵdefineInjector, ɵɵinject, ɵɵinvalidFactory, ɵɵinvalidFactoryDep };
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "static-injector",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.2",
|
|
4
4
|
"description": "Angular 依赖注入独立版本;Angular dependency injection standalone version",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|
|
7
|
-
"angular
|
|
7
|
+
"angular 18.0.0",
|
|
8
8
|
"injector",
|
|
9
9
|
"typescript",
|
|
10
10
|
"injectable",
|
package/readme.md
CHANGED
|
@@ -24,8 +24,8 @@ export interface InjectableDecorator {
|
|
|
24
24
|
* Decorator that marks a class as available to be
|
|
25
25
|
* provided and injected as a dependency.
|
|
26
26
|
*
|
|
27
|
-
* @see [Introduction to Services and DI](guide/
|
|
28
|
-
* @see [Dependency Injection Guide](guide/dependency-injection
|
|
27
|
+
* @see [Introduction to Services and DI](guide/di)
|
|
28
|
+
* @see [Dependency Injection Guide](guide/di/dependency-injection
|
|
29
29
|
*
|
|
30
30
|
* @usageNotes
|
|
31
31
|
*
|
package/typings/di/injector.d.ts
CHANGED
|
@@ -11,10 +11,10 @@ import { Provider, StaticProvider } from './interface/provider';
|
|
|
11
11
|
import { ProviderToken } from './provider_token';
|
|
12
12
|
/**
|
|
13
13
|
* Concrete injectors implement this interface. Injectors are configured
|
|
14
|
-
* with [providers](guide/dependency-injection-providers) that associate
|
|
15
|
-
* dependencies of various types with [injection tokens](guide/dependency-injection-providers).
|
|
14
|
+
* with [providers](guide/di/dependency-injection-providers) that associate
|
|
15
|
+
* dependencies of various types with [injection tokens](guide/di/dependency-injection-providers).
|
|
16
16
|
*
|
|
17
|
-
* @see [DI Providers](guide/dependency-injection-providers).
|
|
17
|
+
* @see [DI Providers](guide/di/dependency-injection-providers).
|
|
18
18
|
* @see {@link StaticProvider}
|
|
19
19
|
*
|
|
20
20
|
* @usageNotes
|
|
@@ -20,7 +20,7 @@ export interface ValueSansProvider {
|
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
22
|
* Configures the `Injector` to return a value for a token.
|
|
23
|
-
* @see [Dependency Injection Guide](guide/dependency-injection
|
|
23
|
+
* @see [Dependency Injection Guide](guide/di/dependency-injection.
|
|
24
24
|
*
|
|
25
25
|
* @usageNotes
|
|
26
26
|
*
|
|
@@ -65,7 +65,7 @@ export interface StaticClassSansProvider {
|
|
|
65
65
|
}
|
|
66
66
|
/**
|
|
67
67
|
* Configures the `Injector` to return an instance of `useClass` for a token.
|
|
68
|
-
* @see [Dependency Injection Guide](guide/dependency-injection
|
|
68
|
+
* @see [Dependency Injection Guide](guide/di/dependency-injection.
|
|
69
69
|
*
|
|
70
70
|
* @usageNotes
|
|
71
71
|
*
|
|
@@ -95,7 +95,7 @@ export interface StaticClassProvider extends StaticClassSansProvider {
|
|
|
95
95
|
/**
|
|
96
96
|
* Configures the `Injector` to return an instance of a token.
|
|
97
97
|
*
|
|
98
|
-
* @see [Dependency Injection Guide](guide/dependency-injection
|
|
98
|
+
* @see [Dependency Injection Guide](guide/di/dependency-injection.
|
|
99
99
|
*
|
|
100
100
|
* @usageNotes
|
|
101
101
|
*
|
|
@@ -115,7 +115,7 @@ export interface ConstructorSansProvider {
|
|
|
115
115
|
/**
|
|
116
116
|
* Configures the `Injector` to return an instance of a token.
|
|
117
117
|
*
|
|
118
|
-
* @see [Dependency Injection Guide](guide/dependency-injection
|
|
118
|
+
* @see [Dependency Injection Guide](guide/di/dependency-injection.
|
|
119
119
|
*
|
|
120
120
|
* @usageNotes
|
|
121
121
|
*
|
|
@@ -142,7 +142,7 @@ export interface ConstructorProvider extends ConstructorSansProvider {
|
|
|
142
142
|
* Configures the `Injector` to return a value of another `useExisting` token.
|
|
143
143
|
*
|
|
144
144
|
* @see {@link ExistingProvider}
|
|
145
|
-
* @see [Dependency Injection Guide](guide/dependency-injection
|
|
145
|
+
* @see [Dependency Injection Guide](guide/di/dependency-injection.
|
|
146
146
|
*
|
|
147
147
|
* @publicApi
|
|
148
148
|
*/
|
|
@@ -155,7 +155,7 @@ export interface ExistingSansProvider {
|
|
|
155
155
|
/**
|
|
156
156
|
* Configures the `Injector` to return a value of another `useExisting` token.
|
|
157
157
|
*
|
|
158
|
-
* @see [Dependency Injection Guide](guide/dependency-injection
|
|
158
|
+
* @see [Dependency Injection Guide](guide/di/dependency-injection.
|
|
159
159
|
*
|
|
160
160
|
* @usageNotes
|
|
161
161
|
*
|
|
@@ -182,7 +182,7 @@ export interface ExistingProvider extends ExistingSansProvider {
|
|
|
182
182
|
* Configures the `Injector` to return a value by invoking a `useFactory` function.
|
|
183
183
|
*
|
|
184
184
|
* @see {@link FactoryProvider}
|
|
185
|
-
* @see [Dependency Injection Guide](guide/dependency-injection
|
|
185
|
+
* @see [Dependency Injection Guide](guide/di/dependency-injection.
|
|
186
186
|
*
|
|
187
187
|
* @publicApi
|
|
188
188
|
*/
|
|
@@ -200,7 +200,7 @@ export interface FactorySansProvider {
|
|
|
200
200
|
}
|
|
201
201
|
/**
|
|
202
202
|
* Configures the `Injector` to return a value by invoking a `useFactory` function.
|
|
203
|
-
* @see [Dependency Injection Guide](guide/dependency-injection
|
|
203
|
+
* @see [Dependency Injection Guide](guide/di/dependency-injection.
|
|
204
204
|
*
|
|
205
205
|
* @usageNotes
|
|
206
206
|
*
|
|
@@ -232,7 +232,7 @@ export interface FactoryProvider extends FactorySansProvider {
|
|
|
232
232
|
* A static provider provides tokens to an injector for various types of dependencies.
|
|
233
233
|
*
|
|
234
234
|
* @see {@link Injector.create()}
|
|
235
|
-
* @see [Dependency Injection Guide](guide/dependency-injection-providers).
|
|
235
|
+
* @see [Dependency Injection Guide](guide/di/dependency-injection-providers).
|
|
236
236
|
*
|
|
237
237
|
* @publicApi
|
|
238
238
|
*/
|
|
@@ -243,7 +243,7 @@ export type StaticProvider = ValueProvider | ExistingProvider | StaticClassProvi
|
|
|
243
243
|
* Create an instance by invoking the `new` operator and supplying additional arguments.
|
|
244
244
|
* This form is a short form of `TypeProvider`;
|
|
245
245
|
*
|
|
246
|
-
* For more details, see the ["Dependency Injection Guide"](guide/dependency-injection
|
|
246
|
+
* For more details, see the ["Dependency Injection Guide"](guide/di/dependency-injection.
|
|
247
247
|
*
|
|
248
248
|
* @usageNotes
|
|
249
249
|
*
|
|
@@ -257,7 +257,7 @@ export interface TypeProvider extends Type<any> {
|
|
|
257
257
|
* Configures the `Injector` to return a value by invoking a `useClass` function.
|
|
258
258
|
* Base for `ClassProvider` decorator.
|
|
259
259
|
*
|
|
260
|
-
* @see [Dependency Injection Guide](guide/dependency-injection
|
|
260
|
+
* @see [Dependency Injection Guide](guide/di/dependency-injection.
|
|
261
261
|
*
|
|
262
262
|
* @publicApi
|
|
263
263
|
*/
|
|
@@ -269,7 +269,7 @@ export interface ClassSansProvider {
|
|
|
269
269
|
}
|
|
270
270
|
/**
|
|
271
271
|
* Configures the `Injector` to return an instance of `useClass` for a token.
|
|
272
|
-
* @see [Dependency Injection Guide](guide/dependency-injection
|
|
272
|
+
* @see [Dependency Injection Guide](guide/di/dependency-injection.
|
|
273
273
|
*
|
|
274
274
|
* @usageNotes
|
|
275
275
|
*
|
|
@@ -298,7 +298,7 @@ export interface ClassProvider extends ClassSansProvider {
|
|
|
298
298
|
}
|
|
299
299
|
/**
|
|
300
300
|
* Describes how the `Injector` should be configured.
|
|
301
|
-
* @see [Dependency Injection Guide](guide/dependency-injection
|
|
301
|
+
* @see [Dependency Injection Guide](guide/di/dependency-injection.
|
|
302
302
|
*
|
|
303
303
|
* @see {@link StaticProvider}
|
|
304
304
|
*
|
|
@@ -339,10 +339,8 @@ export declare function isEnvironmentProviders(value: Provider | EnvironmentProv
|
|
|
339
339
|
*/
|
|
340
340
|
export type ProcessProvidersFunction = (providers: Provider[]) => Provider[];
|
|
341
341
|
/**
|
|
342
|
-
* A wrapper around an NgModule that associates it with
|
|
343
|
-
*
|
|
344
|
-
*
|
|
345
|
-
* @see [Deprecations](guide/deprecations#modulewithproviders-type-without-a-generic)
|
|
342
|
+
* A wrapper around an NgModule that associates it with providers
|
|
343
|
+
* Usage without a generic type is deprecated.
|
|
346
344
|
*
|
|
347
345
|
* @publicApi
|
|
348
346
|
*/
|
package/typings/di/metadata.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ export interface InjectDecorator {
|
|
|
25
25
|
* <code-example path="core/di/ts/metadata_spec.ts" region="InjectWithoutDecorator">
|
|
26
26
|
* </code-example>
|
|
27
27
|
*
|
|
28
|
-
* @see [Dependency Injection Guide](guide/dependency-injection
|
|
28
|
+
* @see [Dependency Injection Guide](guide/di/dependency-injection
|
|
29
29
|
*
|
|
30
30
|
*/
|
|
31
31
|
(token: any): any;
|
|
@@ -38,7 +38,7 @@ export interface InjectDecorator {
|
|
|
38
38
|
*/
|
|
39
39
|
export interface Inject {
|
|
40
40
|
/**
|
|
41
|
-
* A
|
|
41
|
+
* A DI token that maps to the dependency to be injected.
|
|
42
42
|
*/
|
|
43
43
|
token: any;
|
|
44
44
|
}
|
|
@@ -70,7 +70,7 @@ export interface OptionalDecorator {
|
|
|
70
70
|
* <code-example path="core/di/ts/metadata_spec.ts" region="Optional">
|
|
71
71
|
* </code-example>
|
|
72
72
|
*
|
|
73
|
-
* @see [Dependency Injection Guide](guide/dependency-injection
|
|
73
|
+
* @see [Dependency Injection Guide](guide/di/dependency-injection.
|
|
74
74
|
*/
|
|
75
75
|
(): any;
|
|
76
76
|
new (): Optional;
|
|
@@ -152,7 +152,7 @@ export interface SkipSelfDecorator {
|
|
|
152
152
|
* <code-example path="core/di/ts/metadata_spec.ts" region="SkipSelf">
|
|
153
153
|
* </code-example>
|
|
154
154
|
*
|
|
155
|
-
* @see [Dependency Injection guide](guide/
|
|
155
|
+
* @see [Dependency Injection guide](guide/di/di-in-action#skip).
|
|
156
156
|
* @see {@link Self}
|
|
157
157
|
* @see {@link Optional}
|
|
158
158
|
*
|
|
@@ -27,7 +27,7 @@ export type ImportProvidersSource = Type<unknown> | ModuleWithProviders<unknown>
|
|
|
27
27
|
* providers.
|
|
28
28
|
*
|
|
29
29
|
* More information about standalone components can be found in [this
|
|
30
|
-
* guide](guide/
|
|
30
|
+
* guide](guide/components/importing).
|
|
31
31
|
*
|
|
32
32
|
* @usageNotes
|
|
33
33
|
* The results of the `importProvidersFrom` call can be used in the `bootstrapApplication` call:
|
package/typings/errors.d.ts
CHANGED
|
@@ -59,6 +59,7 @@ export declare const enum RuntimeErrorCode {
|
|
|
59
59
|
ASYNC_INITIALIZERS_STILL_RUNNING = 405,
|
|
60
60
|
APPLICATION_REF_ALREADY_DESTROYED = 406,
|
|
61
61
|
RENDERER_NOT_FOUND = 407,
|
|
62
|
+
PROVIDED_BOTH_ZONE_AND_ZONELESS = 408,
|
|
62
63
|
HYDRATION_NODE_MISMATCH = -500,
|
|
63
64
|
HYDRATION_MISSING_SIBLINGS = -501,
|
|
64
65
|
HYDRATION_MISSING_NODE = -502,
|
|
@@ -88,10 +89,13 @@ export declare const enum RuntimeErrorCode {
|
|
|
88
89
|
VIEW_ALREADY_DESTROYED = 911,
|
|
89
90
|
COMPONENT_ID_COLLISION = -912,
|
|
90
91
|
IMAGE_PERFORMANCE_WARNING = -913,
|
|
92
|
+
UNEXPECTED_ZONEJS_PRESENT_IN_ZONELESS_MODE = 914,
|
|
91
93
|
REQUIRED_INPUT_NO_VALUE = -950,
|
|
92
94
|
REQUIRED_QUERY_NO_VALUE = -951,
|
|
93
95
|
REQUIRED_MODEL_NO_VALUE = -952,
|
|
94
96
|
OUTPUT_REF_DESTROYED = 953,
|
|
97
|
+
LOOP_TRACK_DUPLICATE_KEYS = -955,
|
|
98
|
+
LOOP_TRACK_RECREATE = -956,
|
|
95
99
|
RUNTIME_DEPS_INVALID_IMPORTED_TYPE = 1000,
|
|
96
100
|
RUNTIME_DEPS_ORPHAN_COMPONENT = 1001
|
|
97
101
|
}
|
package/typings/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { InjectableDecorator } from './di/injectable';
|
|
1
2
|
export * from './di/injectable';
|
|
2
3
|
export * from './di/metadata';
|
|
3
4
|
export * from './di/r3_injector';
|
|
@@ -9,3 +10,9 @@ export * from './di/injector';
|
|
|
9
10
|
export * from './di/interface/injector';
|
|
10
11
|
export * from './di/scope';
|
|
11
12
|
export * from './render3/instructions/di';
|
|
13
|
+
export declare class StaticInjectOptions {
|
|
14
|
+
static injectOptions: Parameters<InjectableDecorator>[0];
|
|
15
|
+
}
|
|
16
|
+
export declare class RootStaticInjectOptions {
|
|
17
|
+
static injectOptions: Parameters<InjectableDecorator>[0];
|
|
18
|
+
}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* A lifecycle hook that is called when a directive, pipe, or service is destroyed.
|
|
10
10
|
* Use for any custom cleanup that needs to occur when the
|
|
11
11
|
* instance is destroyed.
|
|
12
|
-
* @see [Lifecycle hooks guide](guide/lifecycle
|
|
12
|
+
* @see [Lifecycle hooks guide](guide/components/lifecycle)
|
|
13
13
|
*
|
|
14
14
|
* @usageNotes
|
|
15
15
|
* The following snippet shows how a component can implement this interface
|