static-injector 1.0.6 → 1.0.10
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 +1295 -0
- package/import/{decorator → es2015/decorator}/injectable.js +1 -4
- package/import/{di → es2015/decorator}/interface/provider.js +1 -2
- package/import/{di → es2015/di}/forward_ref.js +8 -14
- package/import/{di → es2015/di}/inject_switch.js +8 -12
- package/import/{di → es2015/di}/injection_token.js +3 -9
- package/import/es2015/di/injector.js +63 -0
- package/import/{di → es2015/di}/injector_compatibility.js +31 -42
- package/import/{di → es2015/di}/injector_marker.js +1 -2
- package/import/{di → es2015/di}/injector_token.js +2 -5
- package/import/{di → es2015/di}/interface/defs.js +7 -42
- package/import/{di → es2015/di}/interface/injector.js +2 -5
- package/import/{decorator → es2015/di}/interface/provider.js +1 -2
- package/import/{di → es2015/di}/metadata.js +10 -13
- package/import/es2015/di/null_injector.js +19 -0
- package/import/{di → es2015/di}/provider_token.js +1 -2
- package/import/{di → es2015/di}/r3_injector.js +53 -153
- package/import/{di → es2015/di}/scope.js +2 -5
- package/import/es2015/index.js +12 -0
- package/import/{interface → es2015/interface}/lifecycle_hooks.js +1 -2
- package/import/es2015/interface/type.js +8 -0
- package/import/es2015/render3/definition_factory.js +15 -0
- package/import/es2015/render3/di.js +49 -0
- package/import/{render3 → es2015/render3}/error_code.js +2 -7
- package/import/es2015/render3/errors_di.js +14 -0
- package/import/es2015/render3/fields.js +11 -0
- package/import/{render3 → es2015/render3}/instructions/di.js +1 -5
- package/import/{render3 → es2015/render3}/util/stringify_utils.js +2 -7
- package/import/{util → es2015/util}/array_utils.js +2 -7
- package/import/{util → es2015/util}/closure.js +1 -5
- package/import/es2015/util/decorators.js +30 -0
- package/import/{util → es2015/util}/empty.js +1 -4
- package/import/{util → es2015/util}/property.js +1 -5
- package/import/{util → es2015/util}/stringify.js +1 -5
- package/import/fesm2015/index.js +1257 -0
- package/import/{decorator → typings/decorator}/injectable.d.ts +0 -0
- package/import/{decorator → typings/decorator}/interface/provider.d.ts +0 -0
- package/import/{di → typings/di}/forward_ref.d.ts +0 -0
- package/import/{di → typings/di}/inject_switch.d.ts +0 -0
- package/import/{di → typings/di}/injection_token.d.ts +0 -2
- package/import/{di → typings/di}/injector.d.ts +0 -10
- package/import/{di → typings/di}/injector_compatibility.d.ts +0 -0
- package/import/{di → typings/di}/injector_marker.d.ts +0 -0
- package/import/{di → typings/di}/injector_token.d.ts +0 -0
- package/import/{di → typings/di}/interface/defs.d.ts +4 -20
- package/import/{di → typings/di}/interface/injector.d.ts +0 -0
- package/import/{di → typings/di}/interface/provider.d.ts +0 -0
- package/import/{di → typings/di}/metadata.d.ts +0 -0
- package/import/{di → typings/di}/null_injector.d.ts +0 -0
- package/import/{di → typings/di}/provider_token.d.ts +0 -0
- package/import/{di → typings/di}/r3_injector.d.ts +0 -2
- package/import/{di → typings/di}/scope.d.ts +0 -0
- package/import/{index.d.ts → typings/index.d.ts} +1 -0
- package/import/{interface → typings/interface}/lifecycle_hooks.d.ts +0 -0
- package/import/{interface → typings/interface}/type.d.ts +0 -11
- package/import/{render3 → typings/render3}/definition_factory.d.ts +0 -0
- package/import/typings/render3/di.d.ts +12 -0
- package/import/{render3 → typings/render3}/error_code.d.ts +0 -0
- package/import/{render3 → typings/render3}/errors_di.d.ts +0 -0
- package/import/{render3 → typings/render3}/fields.d.ts +0 -0
- package/import/{render3 → typings/render3}/instructions/di.d.ts +0 -0
- package/import/{render3 → typings/render3}/util/stringify_utils.d.ts +0 -0
- package/import/{util → typings/util}/array_utils.d.ts +0 -0
- package/import/{util → typings/util}/closure.d.ts +0 -0
- package/import/{util → typings/util}/decorators.d.ts +1 -3
- package/import/{util → typings/util}/empty.d.ts +0 -0
- package/import/{util → typings/util}/property.d.ts +0 -0
- package/import/{util → typings/util}/stringify.d.ts +0 -0
- package/package.json +8 -4
- package/readme.md +6 -0
- package/transform/compiler/index.js +15 -6
- package/transform/compiler/src/injectable_compiler_2.js +20 -2
- package/transform/compiler/src/render3/partial/util.js +20 -2
- package/transform/compiler/src/render3/r3_factory.js +20 -2
- package/transform/compiler/src/render3/util.js +20 -2
- package/transform/compiler/src/render3/view/util.js +20 -2
- package/transform/compiler-cli/src/ngtsc/annotations/src/injectable.js +20 -2
- package/transform/compiler-cli/src/ngtsc/annotations/src/util.js +20 -2
- package/transform/compiler-cli/src/ngtsc/diagnostics/error.js +20 -2
- package/transform/compiler-cli/src/ngtsc/diagnostics/index.js +12 -3
- package/transform/compiler-cli/src/ngtsc/imports/index.js +11 -2
- package/transform/compiler-cli/src/ngtsc/reflection/index.js +13 -4
- package/transform/compiler-cli/src/ngtsc/reflection/src/host.js +20 -2
- package/transform/compiler-cli/src/ngtsc/reflection/src/type_to_value.js +20 -2
- package/transform/compiler-cli/src/ngtsc/reflection/src/typescript.js +20 -2
- package/transform/compiler-cli/src/ngtsc/reflection/src/util.js +20 -2
- package/transform/compiler-cli/src/ngtsc/transform/index.js +12 -3
- package/transform/compiler-cli/src/ngtsc/transform/src/utils.js +20 -2
- package/transform/compiler-cli/src/ngtsc/translator/index.js +15 -6
- package/transform/compiler-cli/src/ngtsc/translator/src/import_manager.js +20 -2
- package/transform/compiler-cli/src/ngtsc/translator/src/translator.js +20 -2
- package/transform/compiler-cli/src/ngtsc/translator/src/typescript_ast_factory.js +20 -2
- package/transform/compiler-cli/src/ngtsc/util/src/typescript.js +20 -2
- package/transform/index.js +11 -2
- package/transform/injectable-transform.js +23 -2
- package/transform/node-Iteration.js +4 -2
- package/import/di/injector.js +0 -350
- package/import/di/null_injector.js +0 -23
- package/import/index.js +0 -14
- package/import/interface/type.js +0 -21
- package/import/render3/definition_factory.js +0 -19
- package/import/render3/errors_di.js +0 -18
- package/import/render3/fields.js +0 -14
- package/import/util/decorators.js +0 -58
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -48,8 +48,6 @@ import { Type } from '../interface/type';
|
|
|
48
48
|
*/
|
|
49
49
|
export declare class InjectionToken<T> {
|
|
50
50
|
protected _desc: string;
|
|
51
|
-
/** @internal */
|
|
52
|
-
readonly ngMetadataName = "InjectionToken";
|
|
53
51
|
readonly ɵprov: unknown;
|
|
54
52
|
constructor(_desc: string, options?: {
|
|
55
53
|
providedIn?: Type<any> | 'root' | 'platform' | 'any' | null;
|
|
@@ -74,13 +74,3 @@ export declare abstract class Injector {
|
|
|
74
74
|
*/
|
|
75
75
|
static __NG_ELEMENT_ID__: InjectorMarkers;
|
|
76
76
|
}
|
|
77
|
-
export declare class StaticInjector implements Injector {
|
|
78
|
-
readonly parent: Injector;
|
|
79
|
-
readonly source: string | null;
|
|
80
|
-
readonly scope: string | null;
|
|
81
|
-
private _records;
|
|
82
|
-
constructor(providers: StaticProvider[], parent?: Injector, source?: string | null);
|
|
83
|
-
get<T>(token: ProviderToken<T>, notFoundValue?: T, flags?: InjectFlags): T;
|
|
84
|
-
get(token: any, notFoundValue?: any): any;
|
|
85
|
-
toString(): string;
|
|
86
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -5,8 +5,8 @@
|
|
|
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.io/license
|
|
7
7
|
*/
|
|
8
|
-
import { Type } from
|
|
9
|
-
import { ClassProvider, ConstructorProvider, ExistingProvider, FactoryProvider, StaticClassProvider, ValueProvider } from
|
|
8
|
+
import { Type } from '../../interface/type';
|
|
9
|
+
import { ClassProvider, ConstructorProvider, ExistingProvider, FactoryProvider, StaticClassProvider, ValueProvider } from './provider';
|
|
10
10
|
/**
|
|
11
11
|
* Information about how a type or `InjectionToken` interfaces with the DI system.
|
|
12
12
|
*
|
|
@@ -31,7 +31,7 @@ export interface ɵɵInjectableDeclaration<T> {
|
|
|
31
31
|
* - `null`, does not belong to any injector. Must be explicitly listed in the injector
|
|
32
32
|
* `providers`.
|
|
33
33
|
*/
|
|
34
|
-
providedIn: InjectorType<any> |
|
|
34
|
+
providedIn: InjectorType<any> | 'root' | 'platform' | 'any' | null;
|
|
35
35
|
/**
|
|
36
36
|
* The token to which this definition belongs.
|
|
37
37
|
*
|
|
@@ -89,7 +89,6 @@ export interface InjectableType<T> extends Type<T> {
|
|
|
89
89
|
*/
|
|
90
90
|
export interface InjectorType<T> extends Type<T> {
|
|
91
91
|
ɵfac?: unknown;
|
|
92
|
-
ɵinj: unknown;
|
|
93
92
|
}
|
|
94
93
|
/**
|
|
95
94
|
* Describes the `InjectorDef` equivalent of a `ModuleWithProviders`, an `InjectorType` with an
|
|
@@ -122,15 +121,9 @@ export interface InjectorTypeWithProviders<T> {
|
|
|
122
121
|
*/
|
|
123
122
|
export declare function ɵɵdefineInjectable<T>(opts: {
|
|
124
123
|
token: unknown;
|
|
125
|
-
providedIn?: Type<any> |
|
|
124
|
+
providedIn?: Type<any> | 'root' | 'platform' | 'any' | null;
|
|
126
125
|
factory: () => T;
|
|
127
126
|
}): unknown;
|
|
128
|
-
/**
|
|
129
|
-
* @deprecated in v8, delete after v10. This API should be used only by generated code, and that
|
|
130
|
-
* code should now use ɵɵdefineInjectable instead.
|
|
131
|
-
* @publicApi
|
|
132
|
-
*/
|
|
133
|
-
export declare const defineInjectable: typeof ɵɵdefineInjectable;
|
|
134
127
|
/**
|
|
135
128
|
* Construct an `InjectorDef` which configures an injector.
|
|
136
129
|
*
|
|
@@ -159,13 +152,4 @@ export declare function ɵɵdefineInjector(options: {
|
|
|
159
152
|
* @param type A type which may have its own (non-inherited) `ɵprov`.
|
|
160
153
|
*/
|
|
161
154
|
export declare function getInjectableDef<T>(type: any): ɵɵInjectableDeclaration<T> | null;
|
|
162
|
-
/**
|
|
163
|
-
* Read the injector def type in a way which is immune to accidentally reading inherited value.
|
|
164
|
-
*
|
|
165
|
-
* @param type type which may have an injector def (`ɵinj`)
|
|
166
|
-
*/
|
|
167
|
-
export declare function getInjectorDef<T>(type: any): ɵɵInjectorDef<T> | null;
|
|
168
155
|
export declare const NG_PROV_DEF: string;
|
|
169
|
-
export declare const NG_INJ_DEF: string;
|
|
170
|
-
export declare const NG_INJECTABLE_DEF: string;
|
|
171
|
-
export declare const NG_INJECTOR_DEF: string;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -75,7 +75,6 @@ export declare class R3Injector {
|
|
|
75
75
|
* to be processed. This allows us to process providers of injector types after all imports of
|
|
76
76
|
* an injector definition are processed. (following View Engine semantics: see FW-1349)
|
|
77
77
|
*/
|
|
78
|
-
private processInjectorType;
|
|
79
78
|
/**
|
|
80
79
|
* Process a `SingleProvider` and add it.
|
|
81
80
|
*/
|
|
@@ -90,5 +89,4 @@ export declare class R3Injector {
|
|
|
90
89
|
*/
|
|
91
90
|
export declare function providerToFactory(provider: SingleProvider, ngModuleType?: InjectorType<any>, providers?: any[]): () => any;
|
|
92
91
|
export declare function isTypeProvider(value: SingleProvider): value is TypeProvider;
|
|
93
|
-
export declare function isClassProvider(value: SingleProvider): value is ClassProvider;
|
|
94
92
|
export {};
|
|
File without changes
|
|
File without changes
|
|
@@ -5,17 +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.io/license
|
|
7
7
|
*/
|
|
8
|
-
/**
|
|
9
|
-
* @description
|
|
10
|
-
*
|
|
11
|
-
* Represents a type that a Component or other object is instances of.
|
|
12
|
-
*
|
|
13
|
-
* An example of a `Type` is `MyCustomComponent` class, which in JavaScript is represented by
|
|
14
|
-
* the `MyCustomComponent` constructor function.
|
|
15
|
-
*
|
|
16
|
-
* @publicApi
|
|
17
|
-
*/
|
|
18
|
-
export declare const Type: FunctionConstructor;
|
|
19
8
|
/**
|
|
20
9
|
* @description
|
|
21
10
|
*
|
|
File without changes
|
|
@@ -0,0 +1,12 @@
|
|
|
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
|
+
* @codeGenApi
|
|
11
|
+
*/
|
|
12
|
+
export declare function ɵɵgetInheritedFactory<T>(type: Type<any>): (type: Type<T>) => T;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -24,6 +24,4 @@ export interface TypeDecorator {
|
|
|
24
24
|
<T extends Type<any>>(type: T): T;
|
|
25
25
|
(target: Object, propertyKey?: string | symbol, parameterIndex?: number): void;
|
|
26
26
|
}
|
|
27
|
-
export declare
|
|
28
|
-
export declare const PARAMETERS = "__parameters__";
|
|
29
|
-
export declare function makeParamDecorator(name: string, props?: (...args: any[]) => any, parentClass?: any): any;
|
|
27
|
+
export declare function makeParamDecorator(name: string, props?: (...args: any[]) => any): any;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "static-injector",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.10",
|
|
4
4
|
"description": "Angular的静态注入器独立使用版本",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|
|
@@ -16,14 +16,18 @@
|
|
|
16
16
|
"url": "https://github.com/wszgrcy/static-injector/issues"
|
|
17
17
|
},
|
|
18
18
|
"homepage": "https://github.com/wszgrcy/static-injector#readme",
|
|
19
|
-
"main": "import/index.js",
|
|
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",
|
|
20
25
|
"private": false,
|
|
21
26
|
"scripts": {},
|
|
22
27
|
"author": "wszgrcy",
|
|
23
28
|
"license": "MIT",
|
|
24
29
|
"peerDependencies": {
|
|
25
|
-
"typescript": "^4.0.0"
|
|
26
|
-
"tslib": "^2.3.0"
|
|
30
|
+
"typescript": "^4.0.0"
|
|
27
31
|
},
|
|
28
32
|
"devDependencies": {},
|
|
29
33
|
"sideEffects": false
|
package/readme.md
CHANGED
|
@@ -20,3 +20,9 @@
|
|
|
20
20
|
|
|
21
21
|
- 做了一部分的单元测试.保证大部分功能正常使用
|
|
22
22
|
- 因为大部分代码本身就是从 Angular 中提取的,所以稳定性肯定也是有保证
|
|
23
|
+
|
|
24
|
+
# 模板
|
|
25
|
+
|
|
26
|
+
- [typescript 下使用(使用 Typescript Compiler API)](https://github.com/wszgrcy/static-injector-typescript-template)
|
|
27
|
+
- [webpack 下使用](https://github.com/wszgrcy/static-injector-webpack-template)
|
|
28
|
+
- [rollup 下使用](https://github.com/wszgrcy/static-injector-rollup-template)
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
2
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
tslib_1.__exportStar(require("./src/parse_util"), exports);
|
|
13
|
+
__exportStar(require("./src/injectable_compiler_2"), exports);
|
|
14
|
+
__exportStar(require("./src/render3/r3_factory"), exports);
|
|
15
|
+
__exportStar(require("./src/output/output_ast"), exports);
|
|
16
|
+
__exportStar(require("./src/render3/util"), exports);
|
|
17
|
+
__exportStar(require("./src/parse_util"), exports);
|
|
@@ -6,10 +6,28 @@
|
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
9
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
29
|
exports.createInjectableType = exports.compileInjectable = exports.createR3ProviderExpression = void 0;
|
|
11
|
-
const
|
|
12
|
-
const o = tslib_1.__importStar(require("./output/output_ast"));
|
|
30
|
+
const o = __importStar(require("./output/output_ast"));
|
|
13
31
|
const util_1 = require("./render3/partial/util");
|
|
14
32
|
const r3_factory_1 = require("./render3/r3_factory");
|
|
15
33
|
const r3_identifiers_1 = require("./render3/r3_identifiers");
|
|
@@ -1,7 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
2
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
22
|
exports.generateForwardRef = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
23
|
/**
|
|
6
24
|
* @license
|
|
7
25
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -9,7 +27,7 @@ const tslib_1 = require("tslib");
|
|
|
9
27
|
* Use of this source code is governed by an MIT-style license that can be
|
|
10
28
|
* found in the LICENSE file at https://angular.io/license
|
|
11
29
|
*/
|
|
12
|
-
const o =
|
|
30
|
+
const o = __importStar(require("../../output/output_ast"));
|
|
13
31
|
const r3_identifiers_1 = require("../r3_identifiers");
|
|
14
32
|
/**
|
|
15
33
|
* Generate an expression that has the given `expr` wrapped in the following form:
|
|
@@ -6,10 +6,28 @@
|
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
9
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
29
|
exports.isExpressionFactoryMetadata = exports.isDelegatedFactoryMetadata = exports.createFactoryType = exports.compileFactoryFunction = exports.FactoryTarget = exports.R3FactoryDelegateType = void 0;
|
|
11
|
-
const
|
|
12
|
-
const outputAst = tslib_1.__importStar(require("../output/output_ast"));
|
|
30
|
+
const outputAst = __importStar(require("../output/output_ast"));
|
|
13
31
|
const r3_identifiers_1 = require("../render3/r3_identifiers");
|
|
14
32
|
const util_1 = require("./util");
|
|
15
33
|
var R3FactoryDelegateType;
|
|
@@ -1,7 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
2
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
22
|
exports.typeWithParameters = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
23
|
/**
|
|
6
24
|
* @license
|
|
7
25
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -9,7 +27,7 @@ const tslib_1 = require("tslib");
|
|
|
9
27
|
* Use of this source code is governed by an MIT-style license that can be
|
|
10
28
|
* found in the LICENSE file at https://angular.io/license
|
|
11
29
|
*/
|
|
12
|
-
const o =
|
|
30
|
+
const o = __importStar(require("../output/output_ast"));
|
|
13
31
|
function typeWithParameters(type, numParams) {
|
|
14
32
|
if (numParams === 0) {
|
|
15
33
|
return o.expressionType(type);
|
|
@@ -6,10 +6,28 @@
|
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
9
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
29
|
exports.DefinitionMap = void 0;
|
|
11
|
-
const
|
|
12
|
-
const o = tslib_1.__importStar(require("../../output/output_ast"));
|
|
30
|
+
const o = __importStar(require("../../output/output_ast"));
|
|
13
31
|
/**
|
|
14
32
|
* Checks whether an object key contains potentially unsafe chars, thus the key should be wrapped in
|
|
15
33
|
* quotes. Note: we do not wrap all keys into quotes, as it may have impact on minification and may
|
|
@@ -6,11 +6,29 @@
|
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
9
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
29
|
exports.InjectableDecoratorHandler = void 0;
|
|
11
|
-
const tslib_1 = require("tslib");
|
|
12
30
|
const compiler_1 = require("../../../../../compiler");
|
|
13
|
-
const ts =
|
|
31
|
+
const ts = __importStar(require("typescript"));
|
|
14
32
|
const diagnostics_1 = require("../../diagnostics");
|
|
15
33
|
const reflection_1 = require("../../reflection");
|
|
16
34
|
const factory_1 = require("./factory");
|
|
@@ -6,11 +6,29 @@
|
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
9
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
29
|
exports.toFactoryMetadata = exports.wrapTypeReference = exports.wrapFunctionExpressionsInParens = exports.tryUnwrapForwardRef = exports.unwrapExpression = exports.isAngularDecorator = exports.findAngularDecorator = exports.isAngularCore = exports.validateConstructorDependencies = exports.getValidConstructorDependencies = exports.unwrapConstructorDependencies = exports.valueReferenceToExpression = exports.getConstructorDependencies = void 0;
|
|
11
|
-
const tslib_1 = require("tslib");
|
|
12
30
|
const compiler_1 = require("../../../../../compiler");
|
|
13
|
-
const ts =
|
|
31
|
+
const ts = __importStar(require("typescript"));
|
|
14
32
|
const diagnostics_1 = require("../../diagnostics");
|
|
15
33
|
const reflection_1 = require("../../reflection");
|
|
16
34
|
function getConstructorDependencies(clazz, reflector, isCore) {
|
|
@@ -6,10 +6,28 @@
|
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
9
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
29
|
exports.isFatalDiagnosticError = exports.makeRelatedInformation = exports.makeDiagnostic = exports.FatalDiagnosticError = void 0;
|
|
11
|
-
const
|
|
12
|
-
const ts = tslib_1.__importStar(require("typescript"));
|
|
30
|
+
const ts = __importStar(require("typescript"));
|
|
13
31
|
const error_code_1 = require("./error_code");
|
|
14
32
|
class FatalDiagnosticError {
|
|
15
33
|
constructor(code, node, message, relatedInformation) {
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
2
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
tslib_1.__exportStar(require("./error_code"), exports);
|
|
13
|
+
__exportStar(require("./error"), exports);
|
|
14
|
+
__exportStar(require("./error_code"), exports);
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
2
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
tslib_1.__exportStar(require("./src/core"), exports);
|
|
13
|
+
__exportStar(require("./src/core"), exports);
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
2
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
tslib_1.__exportStar(require("./src/util"), exports);
|
|
13
|
+
__exportStar(require("./src/host"), exports);
|
|
14
|
+
__exportStar(require("./src/typescript"), exports);
|
|
15
|
+
__exportStar(require("./src/util"), exports);
|
|
@@ -6,10 +6,28 @@
|
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
9
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
29
|
exports.isConcreteDeclaration = exports.KnownDeclaration = exports.ClassMemberKind = exports.isDecoratorIdentifier = exports.Decorator = void 0;
|
|
11
|
-
const
|
|
12
|
-
const ts = tslib_1.__importStar(require("typescript"));
|
|
30
|
+
const ts = __importStar(require("typescript"));
|
|
13
31
|
exports.Decorator = {
|
|
14
32
|
nodeForError: (decorator) => {
|
|
15
33
|
if (decorator.node !== null) {
|