static-injector 1.0.8
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/commonjs/index.js +1248 -0
- package/import/es2015/decorator/injectable.js +14 -0
- package/import/es2015/decorator/interface/provider.js +8 -0
- package/import/es2015/di/forward_ref.js +53 -0
- package/import/es2015/di/inject_switch.js +31 -0
- package/import/es2015/di/injection_token.js +71 -0
- package/import/es2015/di/injector.js +63 -0
- package/import/es2015/di/injector_compatibility.js +172 -0
- package/import/es2015/di/injector_marker.js +8 -0
- package/import/es2015/di/injector_token.js +21 -0
- package/import/es2015/di/interface/defs.js +72 -0
- package/import/es2015/di/interface/injector.js +25 -0
- package/import/es2015/di/interface/provider.js +8 -0
- package/import/es2015/di/metadata.js +49 -0
- package/import/es2015/di/null_injector.js +19 -0
- package/import/es2015/di/provider_token.js +8 -0
- package/import/es2015/di/r3_injector.js +382 -0
- package/import/es2015/di/scope.js +14 -0
- package/import/es2015/index.js +11 -0
- package/import/es2015/interface/lifecycle_hooks.js +8 -0
- package/import/es2015/interface/type.js +8 -0
- package/import/es2015/render3/definition_factory.js +15 -0
- package/import/es2015/render3/error_code.js +29 -0
- package/import/es2015/render3/errors_di.js +14 -0
- package/import/es2015/render3/fields.js +11 -0
- package/import/es2015/render3/instructions/di.js +23 -0
- package/import/es2015/render3/util/stringify_utils.js +37 -0
- package/import/es2015/util/array_utils.js +17 -0
- package/import/es2015/util/closure.js +19 -0
- package/import/es2015/util/decorators.js +30 -0
- package/import/es2015/util/empty.js +14 -0
- package/import/es2015/util/property.js +15 -0
- package/import/es2015/util/stringify.js +30 -0
- package/import/fesm2015/index.js +1211 -0
- package/import/typings/decorator/injectable.d.ts +82 -0
- package/import/typings/decorator/interface/provider.d.ts +312 -0
- package/import/typings/di/forward_ref.d.ts +49 -0
- package/import/typings/di/inject_switch.d.ts +17 -0
- package/import/typings/di/injection_token.d.ts +57 -0
- package/import/typings/di/injector.d.ts +76 -0
- package/import/typings/di/injector_compatibility.d.ts +77 -0
- package/import/typings/di/injector_marker.d.ts +23 -0
- package/import/typings/di/injector_token.d.ts +18 -0
- package/import/typings/di/interface/defs.d.ts +155 -0
- package/import/typings/di/interface/injector.d.ts +48 -0
- package/import/typings/di/interface/provider.d.ts +312 -0
- package/import/typings/di/metadata.d.ts +176 -0
- package/import/typings/di/null_injector.d.ts +11 -0
- package/import/typings/di/provider_token.d.ts +17 -0
- package/import/typings/di/r3_injector.d.ts +92 -0
- package/import/typings/di/scope.d.ts +14 -0
- package/import/typings/index.d.ts +11 -0
- package/import/typings/interface/lifecycle_hooks.d.ts +28 -0
- package/import/typings/interface/type.d.ts +21 -0
- package/import/typings/render3/definition_factory.d.ts +24 -0
- package/import/typings/render3/error_code.d.ts +24 -0
- package/import/typings/render3/errors_di.d.ts +2 -0
- package/import/typings/render3/fields.d.ts +8 -0
- package/import/typings/render3/instructions/di.d.ts +20 -0
- package/import/typings/render3/util/stringify_utils.d.ts +20 -0
- package/import/typings/util/array_utils.d.ts +10 -0
- package/import/typings/util/closure.d.ts +17 -0
- package/import/typings/util/decorators.d.ts +27 -0
- package/import/typings/util/empty.d.ts +14 -0
- package/import/typings/util/property.d.ts +8 -0
- package/import/typings/util/stringify.d.ts +8 -0
- package/package.json +34 -0
- package/readme.md +27 -0
- package/transform/compiler/index.d.ts +5 -0
- package/transform/compiler/index.js +17 -0
- package/transform/compiler/src/core.d.ts +19 -0
- package/transform/compiler/src/core.js +9 -0
- package/transform/compiler/src/injectable_compiler_2.d.ts +53 -0
- package/transform/compiler/src/injectable_compiler_2.js +159 -0
- package/transform/compiler/src/output/output_ast.d.ts +534 -0
- package/transform/compiler/src/output/output_ast.js +986 -0
- package/transform/compiler/src/parse_util.d.ts +50 -0
- package/transform/compiler/src/parse_util.js +61 -0
- package/transform/compiler/src/render3/partial/api.d.ts +166 -0
- package/transform/compiler/src/render3/partial/api.js +11 -0
- package/transform/compiler/src/render3/partial/util.d.ts +16 -0
- package/transform/compiler/src/render3/partial/util.js +44 -0
- package/transform/compiler/src/render3/r3_factory.d.ts +97 -0
- package/transform/compiler/src/render3/r3_factory.js +239 -0
- package/transform/compiler/src/render3/r3_identifiers.d.ts +20 -0
- package/transform/compiler/src/render3/r3_identifiers.js +51 -0
- package/transform/compiler/src/render3/util.d.ts +21 -0
- package/transform/compiler/src/render3/util.js +41 -0
- package/transform/compiler/src/render3/view/util.d.ts +30 -0
- package/transform/compiler/src/render3/view/util.js +57 -0
- package/transform/compiler-cli/src/ngtsc/annotations/src/factory.d.ts +11 -0
- package/transform/compiler-cli/src/ngtsc/annotations/src/factory.js +21 -0
- package/transform/compiler-cli/src/ngtsc/annotations/src/injectable.d.ts +42 -0
- package/transform/compiler-cli/src/ngtsc/annotations/src/injectable.js +278 -0
- package/transform/compiler-cli/src/ngtsc/annotations/src/util.d.ts +91 -0
- package/transform/compiler-cli/src/ngtsc/annotations/src/util.js +370 -0
- package/transform/compiler-cli/src/ngtsc/diagnostics/error.d.ts +24 -0
- package/transform/compiler-cli/src/ngtsc/diagnostics/error.js +76 -0
- package/transform/compiler-cli/src/ngtsc/diagnostics/error_code.d.ts +188 -0
- package/transform/compiler-cli/src/ngtsc/diagnostics/error_code.js +206 -0
- package/transform/compiler-cli/src/ngtsc/diagnostics/index.d.ts +2 -0
- package/transform/compiler-cli/src/ngtsc/diagnostics/index.js +14 -0
- package/transform/compiler-cli/src/ngtsc/imports/index.d.ts +1 -0
- package/transform/compiler-cli/src/ngtsc/imports/index.js +13 -0
- package/transform/compiler-cli/src/ngtsc/imports/src/core.d.ts +36 -0
- package/transform/compiler-cli/src/ngtsc/imports/src/core.js +25 -0
- package/transform/compiler-cli/src/ngtsc/reflection/index.d.ts +3 -0
- package/transform/compiler-cli/src/ngtsc/reflection/index.js +15 -0
- package/transform/compiler-cli/src/ngtsc/reflection/src/host.d.ts +667 -0
- package/transform/compiler-cli/src/ngtsc/reflection/src/host.js +98 -0
- package/transform/compiler-cli/src/ngtsc/reflection/src/type_to_value.d.ts +24 -0
- package/transform/compiler-cli/src/ngtsc/reflection/src/type_to_value.js +271 -0
- package/transform/compiler-cli/src/ngtsc/reflection/src/typescript.d.ts +50 -0
- package/transform/compiler-cli/src/ngtsc/reflection/src/typescript.js +396 -0
- package/transform/compiler-cli/src/ngtsc/reflection/src/util.d.ts +12 -0
- package/transform/compiler-cli/src/ngtsc/reflection/src/util.js +45 -0
- package/transform/compiler-cli/src/ngtsc/transform/index.d.ts +2 -0
- package/transform/compiler-cli/src/ngtsc/transform/index.js +14 -0
- package/transform/compiler-cli/src/ngtsc/transform/src/api.d.ts +115 -0
- package/transform/compiler-cli/src/ngtsc/transform/src/api.js +30 -0
- package/transform/compiler-cli/src/ngtsc/transform/src/utils.d.ts +15 -0
- package/transform/compiler-cli/src/ngtsc/transform/src/utils.js +84 -0
- package/transform/compiler-cli/src/ngtsc/translator/index.d.ts +5 -0
- package/transform/compiler-cli/src/ngtsc/translator/index.js +17 -0
- package/transform/compiler-cli/src/ngtsc/translator/src/api/ast_factory.d.ts +274 -0
- package/transform/compiler-cli/src/ngtsc/translator/src/api/ast_factory.js +9 -0
- package/transform/compiler-cli/src/ngtsc/translator/src/api/import_generator.d.ts +27 -0
- package/transform/compiler-cli/src/ngtsc/translator/src/api/import_generator.js +9 -0
- package/transform/compiler-cli/src/ngtsc/translator/src/context.d.ts +18 -0
- package/transform/compiler-cli/src/ngtsc/translator/src/context.js +27 -0
- package/transform/compiler-cli/src/ngtsc/translator/src/import_manager.d.ts +29 -0
- package/transform/compiler-cli/src/ngtsc/translator/src/import_manager.js +70 -0
- package/transform/compiler-cli/src/ngtsc/translator/src/translator.d.ts +58 -0
- package/transform/compiler-cli/src/ngtsc/translator/src/translator.js +270 -0
- package/transform/compiler-cli/src/ngtsc/translator/src/typescript_ast_factory.d.ts +54 -0
- package/transform/compiler-cli/src/ngtsc/translator/src/typescript_ast_factory.js +245 -0
- package/transform/compiler-cli/src/ngtsc/translator/src/typescript_translator.d.ts +13 -0
- package/transform/compiler-cli/src/ngtsc/translator/src/typescript_translator.js +21 -0
- package/transform/compiler-cli/src/ngtsc/util/src/typescript.d.ts +11 -0
- package/transform/compiler-cli/src/ngtsc/util/src/typescript.js +39 -0
- package/transform/index.d.ts +1 -0
- package/transform/index.js +13 -0
- package/transform/injectable-transform.d.ts +41 -0
- package/transform/injectable-transform.js +195 -0
- package/transform/node-Iteration.d.ts +2 -0
- package/transform/node-Iteration.js +12 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.io/license
|
|
7
|
+
*/
|
|
8
|
+
import { Injector } from "./injector";
|
|
9
|
+
export declare class NullInjector implements Injector {
|
|
10
|
+
get(token: any, notFoundValue?: any): any;
|
|
11
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.io/license
|
|
7
|
+
*/
|
|
8
|
+
import { AbstractType, Type } from "../interface/type";
|
|
9
|
+
import { InjectionToken } from "./injection_token";
|
|
10
|
+
/**
|
|
11
|
+
* @description
|
|
12
|
+
*
|
|
13
|
+
* Token that can be used to retrieve an instance from an injector or through a query.
|
|
14
|
+
*
|
|
15
|
+
* @publicApi
|
|
16
|
+
*/
|
|
17
|
+
export declare type ProviderToken<T> = Type<T> | AbstractType<T> | InjectionToken<T>;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.io/license
|
|
7
|
+
*/
|
|
8
|
+
import { Injector } from './injector';
|
|
9
|
+
import { InjectorType } from './interface/defs';
|
|
10
|
+
import { InjectFlags } from './interface/injector';
|
|
11
|
+
import { ClassProvider, ConstructorProvider, ExistingProvider, FactoryProvider, StaticClassProvider, StaticProvider, TypeProvider, ValueProvider } from './interface/provider';
|
|
12
|
+
import { ProviderToken } from './provider_token';
|
|
13
|
+
/**
|
|
14
|
+
* Internal type for a single provider in a deep provider array.
|
|
15
|
+
*/
|
|
16
|
+
declare type SingleProvider = TypeProvider | ValueProvider | ClassProvider | ConstructorProvider | ExistingProvider | FactoryProvider | StaticClassProvider;
|
|
17
|
+
/**
|
|
18
|
+
* Create a new `Injector` which is configured using a `defType` of `InjectorType<any>`s.
|
|
19
|
+
*
|
|
20
|
+
* @publicApi
|
|
21
|
+
*/
|
|
22
|
+
export declare function createInjector(defType: any, parent?: Injector | null, additionalProviders?: StaticProvider[] | null, name?: string): Injector;
|
|
23
|
+
/**
|
|
24
|
+
* Creates a new injector without eagerly resolving its injector types. Can be used in places
|
|
25
|
+
* where resolving the injector types immediately can lead to an infinite loop. The injector types
|
|
26
|
+
* should be resolved at a later point by calling `_resolveInjectorDefTypes`.
|
|
27
|
+
*/
|
|
28
|
+
export declare function createInjectorWithoutInjectorInstances(defType: any, parent?: Injector | null, additionalProviders?: StaticProvider[] | null, name?: string): R3Injector;
|
|
29
|
+
export declare class R3Injector {
|
|
30
|
+
readonly parent: Injector;
|
|
31
|
+
/**
|
|
32
|
+
* Map of tokens to records which contain the instances of those tokens.
|
|
33
|
+
* - `null` value implies that we don't have the record. Used by tree-shakable injectors
|
|
34
|
+
* to prevent further searches.
|
|
35
|
+
*/
|
|
36
|
+
private records;
|
|
37
|
+
/**
|
|
38
|
+
* The transitive set of `InjectorType`s which define this injector.
|
|
39
|
+
*/
|
|
40
|
+
private injectorDefTypes;
|
|
41
|
+
/**
|
|
42
|
+
* Set of values instantiated by this injector which contain `ngOnDestroy` lifecycle hooks.
|
|
43
|
+
*/
|
|
44
|
+
private onDestroy;
|
|
45
|
+
/**
|
|
46
|
+
* Flag indicating this injector provides the APP_ROOT_SCOPE token, and thus counts as the
|
|
47
|
+
* root scope.
|
|
48
|
+
*/
|
|
49
|
+
private readonly scope;
|
|
50
|
+
readonly source: string | null;
|
|
51
|
+
/**
|
|
52
|
+
* Flag indicating that this injector was previously destroyed.
|
|
53
|
+
*/
|
|
54
|
+
get destroyed(): boolean;
|
|
55
|
+
private _destroyed;
|
|
56
|
+
constructor(def: InjectorType<any>, additionalProviders: StaticProvider[] | null, parent: Injector, source?: string | null);
|
|
57
|
+
/**
|
|
58
|
+
* Destroy the injector and release references to every instance or provider associated with it.
|
|
59
|
+
*
|
|
60
|
+
* Also calls the `OnDestroy` lifecycle hooks of every instance that was created for which a
|
|
61
|
+
* hook was found.
|
|
62
|
+
*/
|
|
63
|
+
destroy(): void;
|
|
64
|
+
get<T>(token: ProviderToken<T>, notFoundValue?: any, flags?: InjectFlags): T;
|
|
65
|
+
/** @internal */
|
|
66
|
+
_resolveInjectorDefTypes(): void;
|
|
67
|
+
toString(): string;
|
|
68
|
+
private assertNotDestroyed;
|
|
69
|
+
/**
|
|
70
|
+
* Add an `InjectorType` or `InjectorTypeWithProviders` and all of its transitive providers
|
|
71
|
+
* to this injector.
|
|
72
|
+
*
|
|
73
|
+
* If an `InjectorTypeWithProviders` that declares providers besides the type is specified,
|
|
74
|
+
* the function will return "true" to indicate that the providers of the type definition need
|
|
75
|
+
* to be processed. This allows us to process providers of injector types after all imports of
|
|
76
|
+
* an injector definition are processed. (following View Engine semantics: see FW-1349)
|
|
77
|
+
*/
|
|
78
|
+
/**
|
|
79
|
+
* Process a `SingleProvider` and add it.
|
|
80
|
+
*/
|
|
81
|
+
private processProvider;
|
|
82
|
+
private hydrate;
|
|
83
|
+
private injectableDefInScope;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Converts a `SingleProvider` into a factory function.
|
|
87
|
+
*
|
|
88
|
+
* @param provider provider to convert to factory
|
|
89
|
+
*/
|
|
90
|
+
export declare function providerToFactory(provider: SingleProvider, ngModuleType?: InjectorType<any>, providers?: any[]): () => any;
|
|
91
|
+
export declare function isTypeProvider(value: SingleProvider): value is TypeProvider;
|
|
92
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.io/license
|
|
7
|
+
*/
|
|
8
|
+
import { InjectionToken } from "./injection_token";
|
|
9
|
+
/**
|
|
10
|
+
* An internal token whose presence in an injector indicates that the injector should treat itself
|
|
11
|
+
* as a root scoped injector when processing requests for unknown tokens which may indicate
|
|
12
|
+
* they are provided in the root scope.
|
|
13
|
+
*/
|
|
14
|
+
export declare const INJECTOR_SCOPE: InjectionToken<"root" | "platform">;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from './decorator/injectable';
|
|
2
|
+
export * from './di/metadata';
|
|
3
|
+
export * from './di/r3_injector';
|
|
4
|
+
export * from './di/interface/defs';
|
|
5
|
+
export * from './di/injector_compatibility';
|
|
6
|
+
export * from './di/injection_token';
|
|
7
|
+
export * from './di/null_injector';
|
|
8
|
+
export * from './di/injector';
|
|
9
|
+
export * from './di/interface/injector';
|
|
10
|
+
export * from './di/scope';
|
|
11
|
+
export * from './render3/instructions/di';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.io/license
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* A lifecycle hook that is called when a directive, pipe, or service is destroyed.
|
|
10
|
+
* Use for any custom cleanup that needs to occur when the
|
|
11
|
+
* instance is destroyed.
|
|
12
|
+
* @see [Lifecycle hooks guide](guide/lifecycle-hooks)
|
|
13
|
+
*
|
|
14
|
+
* @usageNotes
|
|
15
|
+
* The following snippet shows how a component can implement this interface
|
|
16
|
+
* to define its own custom clean-up method.
|
|
17
|
+
*
|
|
18
|
+
* {@example core/ts/metadata/lifecycle_hooks_spec.ts region='OnDestroy'}
|
|
19
|
+
*
|
|
20
|
+
* @publicApi
|
|
21
|
+
*/
|
|
22
|
+
export interface OnDestroy {
|
|
23
|
+
/**
|
|
24
|
+
* A callback method that performs custom clean-up, invoked immediately
|
|
25
|
+
* before a directive, pipe, or service instance is destroyed.
|
|
26
|
+
*/
|
|
27
|
+
ngOnDestroy(): void;
|
|
28
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.io/license
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* @description
|
|
10
|
+
*
|
|
11
|
+
* Represents an abstract class `T`, if applied to a concrete class it would stop being
|
|
12
|
+
* instantiable.
|
|
13
|
+
*
|
|
14
|
+
* @publicApi
|
|
15
|
+
*/
|
|
16
|
+
export interface AbstractType<T> extends Function {
|
|
17
|
+
prototype: T;
|
|
18
|
+
}
|
|
19
|
+
export interface Type<T> extends Function {
|
|
20
|
+
new (...args: any[]): T;
|
|
21
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.io/license
|
|
7
|
+
*/
|
|
8
|
+
import { Type } from '../interface/type';
|
|
9
|
+
/**
|
|
10
|
+
* Definition of what a factory function should look like.
|
|
11
|
+
*/
|
|
12
|
+
export declare type FactoryFn<T> = {
|
|
13
|
+
/**
|
|
14
|
+
* Subclasses without an explicit constructor call through to the factory of their base
|
|
15
|
+
* definition, providing it with their own constructor to instantiate.
|
|
16
|
+
*/
|
|
17
|
+
<U extends T>(t?: Type<U>): U;
|
|
18
|
+
/**
|
|
19
|
+
* If no constructor to instantiate is provided, an instance of type T itself is created.
|
|
20
|
+
*/
|
|
21
|
+
(t?: undefined): T;
|
|
22
|
+
};
|
|
23
|
+
export declare function getFactoryDef<T>(type: any, throwNotFound: true): FactoryFn<T>;
|
|
24
|
+
export declare function getFactoryDef<T>(type: any): FactoryFn<T> | null;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.io/license
|
|
7
|
+
*/
|
|
8
|
+
export declare const enum RuntimeErrorCode {
|
|
9
|
+
EXPRESSION_CHANGED_AFTER_CHECKED = "100",
|
|
10
|
+
CYCLIC_DI_DEPENDENCY = "200",
|
|
11
|
+
PROVIDER_NOT_FOUND = "201",
|
|
12
|
+
MULTIPLE_COMPONENTS_MATCH = "300",
|
|
13
|
+
EXPORT_NOT_FOUND = "301",
|
|
14
|
+
PIPE_NOT_FOUND = "302",
|
|
15
|
+
UNKNOWN_BINDING = "303",
|
|
16
|
+
UNKNOWN_ELEMENT = "304",
|
|
17
|
+
TEMPLATE_STRUCTURE_ERROR = "305"
|
|
18
|
+
}
|
|
19
|
+
export declare class RuntimeError extends Error {
|
|
20
|
+
code: RuntimeErrorCode;
|
|
21
|
+
constructor(code: RuntimeErrorCode, message: string);
|
|
22
|
+
}
|
|
23
|
+
/** Called to format a runtime error */
|
|
24
|
+
export declare function formatRuntimeError(code: RuntimeErrorCode, message: string): string;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.io/license
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Throws an error indicating that a factory function could not be generated by the compiler for a
|
|
10
|
+
* particular class.
|
|
11
|
+
*
|
|
12
|
+
* This instruction allows the actual error message to be optimized away when ngDevMode is turned
|
|
13
|
+
* off, saving bytes of generated code while still providing a good experience in dev mode.
|
|
14
|
+
*
|
|
15
|
+
* The name of the class is not mentioned here, but will be in the generated factory function name
|
|
16
|
+
* and thus in the stack trace.
|
|
17
|
+
*
|
|
18
|
+
* @codeGenApi
|
|
19
|
+
*/
|
|
20
|
+
export declare function ɵɵinvalidFactory(): never;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.io/license
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Used for stringify render output in Ivy.
|
|
10
|
+
* Important! This function is very performance-sensitive and we should
|
|
11
|
+
* be extra careful not to introduce megamorphic reads in it.
|
|
12
|
+
* Check `core/test/render3/perf/render_stringify` for benchmarks and alternate implementations.
|
|
13
|
+
*/
|
|
14
|
+
export declare function renderStringify(value: any): string;
|
|
15
|
+
/**
|
|
16
|
+
* Used to stringify a value so that it can be displayed in an error message.
|
|
17
|
+
* Important! This function contains a megamorphic read and should only be
|
|
18
|
+
* used for error messages.
|
|
19
|
+
*/
|
|
20
|
+
export declare function stringifyForError(value: any): string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.io/license
|
|
7
|
+
*/
|
|
8
|
+
export declare function deepForEach<T>(input: (T | any[])[], fn: (value: T) => void): void;
|
|
9
|
+
export declare function newArray<T = any>(size: number): T[];
|
|
10
|
+
export declare function newArray<T>(size: number, value: T): T[];
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.io/license
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Convince closure compiler that the wrapped function has no side-effects.
|
|
10
|
+
*
|
|
11
|
+
* Closure compiler always assumes that `toString` has no side-effects. We use this quirk to
|
|
12
|
+
* allow us to execute a function but have closure compiler mark the call as no-side-effects.
|
|
13
|
+
* It is important that the return value for the `noSideEffects` function be assigned
|
|
14
|
+
* to something which is retained otherwise the call to `noSideEffects` will be removed by closure
|
|
15
|
+
* compiler.
|
|
16
|
+
*/
|
|
17
|
+
export declare function noSideEffects<T>(fn: () => T): T;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.io/license
|
|
7
|
+
*/
|
|
8
|
+
import { Type } from '../interface/type';
|
|
9
|
+
/**
|
|
10
|
+
* An interface implemented by all Angular type decorators, which allows them to be used as
|
|
11
|
+
* decorators as well as Angular syntax.
|
|
12
|
+
*
|
|
13
|
+
* ```
|
|
14
|
+
* @ng.Component({...})
|
|
15
|
+
* class MyClass {...}
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* @publicApi
|
|
19
|
+
*/
|
|
20
|
+
export interface TypeDecorator {
|
|
21
|
+
/**
|
|
22
|
+
* Invoke as decorator.
|
|
23
|
+
*/
|
|
24
|
+
<T extends Type<any>>(type: T): T;
|
|
25
|
+
(target: Object, propertyKey?: string | symbol, parameterIndex?: number): void;
|
|
26
|
+
}
|
|
27
|
+
export declare function makeParamDecorator(name: string, props?: (...args: any[]) => any): any;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.io/license
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* This file contains reuseable "empty" symbols that can be used as default return values
|
|
10
|
+
* in different parts of the rendering code. Because the same symbols are returned, this
|
|
11
|
+
* allows for identity checks against these values to be consistently used by the framework
|
|
12
|
+
* code.
|
|
13
|
+
*/
|
|
14
|
+
export declare const EMPTY_ARRAY: any[];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.io/license
|
|
7
|
+
*/
|
|
8
|
+
export declare function getClosureSafeProperty<T>(objWithPropertyToExtract: T): string;
|
package/package.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "static-injector",
|
|
3
|
+
"version": "1.0.8",
|
|
4
|
+
"description": "Angular的静态注入器独立使用版本",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"angular",
|
|
7
|
+
"injector",
|
|
8
|
+
"typescript",
|
|
9
|
+
"injectable"
|
|
10
|
+
],
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "git+https://github.com/wszgrcy/static-injector.git"
|
|
14
|
+
},
|
|
15
|
+
"bugs": {
|
|
16
|
+
"url": "https://github.com/wszgrcy/static-injector/issues"
|
|
17
|
+
},
|
|
18
|
+
"homepage": "https://github.com/wszgrcy/static-injector#readme",
|
|
19
|
+
"main": "import/commonjs/index.js",
|
|
20
|
+
"es2015": "import/fesm2015/index.js",
|
|
21
|
+
"fesm2015": "import/fesm2015/index.js",
|
|
22
|
+
"esm2015": "import/esm2015/index.js",
|
|
23
|
+
"module": "import/fesm2015/index.js",
|
|
24
|
+
"typings": "import/typings/index.d.ts",
|
|
25
|
+
"private": false,
|
|
26
|
+
"scripts": {},
|
|
27
|
+
"author": "wszgrcy",
|
|
28
|
+
"license": "MIT",
|
|
29
|
+
"peerDependencies": {
|
|
30
|
+
"typescript": "^4.0.0"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {},
|
|
33
|
+
"sideEffects": false
|
|
34
|
+
}
|