static-injector 6.1.0 → 6.1.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/import/di/injection_token.d.ts +0 -6
- package/import/di/injector.d.ts +0 -6
- package/import/di/r3_injector.d.ts +0 -8
- package/import/error_handler.d.ts +0 -4
- package/import/index.d.ts +1 -0
- package/import/linker/destroy_ref.d.ts +0 -12
- package/index.js +2 -0
- package/index.js.map +2 -2
- package/index.mjs +1 -0
- package/index.mjs.map +2 -2
- package/package.json +1 -1
|
@@ -56,8 +56,6 @@ import { Type } from '../interface/type';
|
|
|
56
56
|
*/
|
|
57
57
|
export declare class InjectionToken<T> {
|
|
58
58
|
protected _desc: string;
|
|
59
|
-
/** @internal */
|
|
60
|
-
readonly ngMetadataName = "InjectionToken";
|
|
61
59
|
readonly ɵprov: unknown;
|
|
62
60
|
/**
|
|
63
61
|
* @param _desc Description for the token,
|
|
@@ -69,10 +67,6 @@ export declare class InjectionToken<T> {
|
|
|
69
67
|
providedIn?: Type<any> | 'root' | 'platform' | 'any' | null;
|
|
70
68
|
factory: () => T;
|
|
71
69
|
});
|
|
72
|
-
/**
|
|
73
|
-
* @internal
|
|
74
|
-
*/
|
|
75
|
-
get multi(): InjectionToken<Array<T>>;
|
|
76
70
|
toString(): string;
|
|
77
71
|
}
|
|
78
72
|
export interface InjectableDefToken<T> extends InjectionToken<T> {
|
package/import/di/injector.d.ts
CHANGED
|
@@ -5,7 +5,6 @@
|
|
|
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.dev/license
|
|
7
7
|
*/
|
|
8
|
-
import { InjectorMarkers } from './injector_marker';
|
|
9
8
|
import { InjectOptions } from './interface/injector';
|
|
10
9
|
import { Provider, StaticProvider } from './interface/provider';
|
|
11
10
|
import { ProviderToken } from './provider_token';
|
|
@@ -84,11 +83,6 @@ export declare abstract class Injector {
|
|
|
84
83
|
}): DestroyableInjector;
|
|
85
84
|
/** @nocollapse */
|
|
86
85
|
static ɵprov: unknown;
|
|
87
|
-
/**
|
|
88
|
-
* @internal
|
|
89
|
-
* @nocollapse
|
|
90
|
-
*/
|
|
91
|
-
static __NG_ELEMENT_ID__: InjectorMarkers;
|
|
92
86
|
}
|
|
93
87
|
/**
|
|
94
88
|
* An Injector that the owner can destroy and trigger the DestroyRef.destroy hooks.
|
|
@@ -59,12 +59,6 @@ export declare abstract class EnvironmentInjector implements Injector {
|
|
|
59
59
|
*/
|
|
60
60
|
abstract runInContext<ReturnT>(fn: () => ReturnT): ReturnT;
|
|
61
61
|
abstract destroy(): void;
|
|
62
|
-
/** @internal */
|
|
63
|
-
abstract get destroyed(): boolean;
|
|
64
|
-
/**
|
|
65
|
-
* @internal
|
|
66
|
-
*/
|
|
67
|
-
abstract onDestroy(callback: () => void): () => void;
|
|
68
62
|
}
|
|
69
63
|
export declare class R3Injector extends EnvironmentInjector implements PrimitivesInjector {
|
|
70
64
|
readonly parent: Injector;
|
|
@@ -99,8 +93,6 @@ export declare class R3Injector extends EnvironmentInjector implements Primitive
|
|
|
99
93
|
onDestroy(callback: () => void): () => void;
|
|
100
94
|
runInContext<ReturnT>(fn: () => ReturnT): ReturnT;
|
|
101
95
|
get<T>(token: ProviderToken<T>, notFoundValue?: any, options?: InjectOptions): T;
|
|
102
|
-
/** @internal */
|
|
103
|
-
resolveInjectorInitializers(): void;
|
|
104
96
|
toString(): string;
|
|
105
97
|
/**
|
|
106
98
|
* Process a `SingleProvider` and add it.
|
package/import/index.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ export * from './resource';
|
|
|
22
22
|
export * from './di/provider_token';
|
|
23
23
|
export * from './error_handler';
|
|
24
24
|
export * from './pending_tasks';
|
|
25
|
+
export * from './linker/destroy_ref';
|
|
25
26
|
export declare function Injectable(args?: any): (constructor: Function) => void;
|
|
26
27
|
export declare class StaticInjectOptions {
|
|
27
28
|
static injectOptions: Parameters<InjectableDecorator>[0];
|
|
@@ -5,7 +5,6 @@
|
|
|
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.dev/license
|
|
7
7
|
*/
|
|
8
|
-
import { EnvironmentInjector } from '../di';
|
|
9
8
|
/**
|
|
10
9
|
* `DestroyRef` lets you set callbacks to run for any cleanup or destruction behavior.
|
|
11
10
|
* The scope of this destruction depends on where `DestroyRef` is injected. If `DestroyRef`
|
|
@@ -32,15 +31,4 @@ export declare abstract class DestroyRef {
|
|
|
32
31
|
* ```
|
|
33
32
|
*/
|
|
34
33
|
abstract onDestroy(callback: () => void): () => void;
|
|
35
|
-
/** @internal */
|
|
36
|
-
abstract get destroyed(): boolean;
|
|
37
|
-
/**
|
|
38
|
-
* @internal
|
|
39
|
-
* @nocollapse
|
|
40
|
-
*/
|
|
41
|
-
/**
|
|
42
|
-
* @internal
|
|
43
|
-
* @nocollapse
|
|
44
|
-
*/
|
|
45
|
-
static __NG_ENV_ID__: (injector: EnvironmentInjector) => DestroyRef;
|
|
46
34
|
}
|
package/index.js
CHANGED
|
@@ -23,6 +23,7 @@ __export(import_exports, {
|
|
|
23
23
|
ChangeDetectionScheduler: () => ChangeDetectionScheduler,
|
|
24
24
|
ChangeDetectionSchedulerImpl: () => ChangeDetectionSchedulerImpl,
|
|
25
25
|
DecoratorFlags: () => DecoratorFlags,
|
|
26
|
+
DestroyRef: () => DestroyRef,
|
|
26
27
|
EnvironmentInjector: () => EnvironmentInjector,
|
|
27
28
|
ErrorHandler: () => ErrorHandler,
|
|
28
29
|
INJECTOR_SCOPE: () => INJECTOR_SCOPE,
|
|
@@ -2115,6 +2116,7 @@ function createRootInjector(options) {
|
|
|
2115
2116
|
ChangeDetectionScheduler,
|
|
2116
2117
|
ChangeDetectionSchedulerImpl,
|
|
2117
2118
|
DecoratorFlags,
|
|
2119
|
+
DestroyRef,
|
|
2118
2120
|
EnvironmentInjector,
|
|
2119
2121
|
ErrorHandler,
|
|
2120
2122
|
INJECTOR_SCOPE,
|