static-injector 2.2.1 → 4.0.0
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 +94 -50
- package/import/es2022/di/index.js +1 -0
- package/import/es2022/di/initializer_token.js +1 -1
- package/import/es2022/di/inject_switch.js +1 -2
- package/import/es2022/di/injection_token.js +13 -6
- package/import/es2022/di/injector.js +3 -3
- package/import/es2022/di/injector_compatibility.js +23 -0
- package/import/es2022/di/injector_token.js +2 -3
- package/import/es2022/di/internal_tokens.js +1 -1
- package/import/es2022/di/r3_injector.js +19 -16
- package/import/es2022/di/scope.js +1 -1
- package/import/es2022/di.js +24 -0
- package/import/es2022/render3/errors_di.js +2 -2
- package/import/es2022/render3/instructions/di.js +7 -0
- package/import/es2022/render3/util/stringify_utils.js +1 -0
- package/import/es2022/util/array_utils.js +7 -0
- package/import/es2022/util/stringify.js +15 -0
- package/import/fesm2022/index.js +88 -44
- package/import/typings/di/create_injector.d.ts +2 -2
- package/import/typings/di/forward_ref.d.ts +1 -1
- package/import/typings/di/index.d.ts +1 -0
- package/import/typings/di/initializer_token.d.ts +1 -1
- package/import/typings/di/injection_token.d.ts +11 -6
- package/import/typings/di/injector.d.ts +3 -3
- package/import/typings/di/injector_compatibility.d.ts +2 -1
- package/import/typings/di/injector_token.d.ts +1 -1
- package/import/typings/di/interface/provider.d.ts +12 -12
- package/import/typings/di/internal_tokens.d.ts +1 -1
- package/import/typings/di/metadata.d.ts +2 -2
- package/import/typings/di/null_injector.d.ts +1 -1
- package/import/typings/di/r3_injector.d.ts +1 -1
- package/import/typings/di.d.ts +24 -0
- package/import/typings/errors.d.ts +11 -3
- package/import/typings/render3/errors_di.d.ts +2 -1
- package/import/typings/render3/instructions/di.d.ts +7 -0
- package/import/typings/render3/util/stringify_utils.d.ts +1 -0
- package/import/typings/util/array_utils.d.ts +7 -0
- package/import/typings/util/empty.d.ts +1 -1
- package/import/typings/util/stringify.d.ts +8 -0
- package/package.json +7 -5
- package/readme.md +2 -2
- package/transform/compiler/src/compiler.d.ts +0 -22
- package/transform/compiler/src/compiler.js +0 -26
- package/transform/compiler/src/core.d.ts +6 -0
- package/transform/compiler/src/core.js +13 -0
- package/transform/compiler/src/injectable_compiler_2.js +2 -2
- package/transform/compiler/src/output/output_ast.d.ts +21 -7
- package/transform/compiler/src/output/output_ast.js +55 -9
- package/transform/compiler/src/render3/partial/api.d.ts +5 -0
- package/transform/compiler/src/render3/r3_factory.js +1 -1
- package/transform/compiler/src/render3/r3_identifiers.js +4 -0
- package/transform/compiler/src/render3/util.js +1 -3
- package/transform/compiler/src/render3/view/util.d.ts +2 -0
- package/transform/compiler/src/render3/view/util.js +10 -2
- package/transform/compiler-cli/src/ngtsc/annotations/common/index.d.ts +0 -7
- package/transform/compiler-cli/src/ngtsc/annotations/common/index.js +0 -7
- package/transform/compiler-cli/src/ngtsc/annotations/common/src/util.d.ts +3 -0
- package/transform/compiler-cli/src/ngtsc/annotations/common/src/util.js +14 -2
- package/transform/compiler-cli/src/ngtsc/annotations/src/injectable.d.ts +3 -2
- package/transform/compiler-cli/src/ngtsc/annotations/src/injectable.js +3 -1
- package/transform/compiler-cli/src/ngtsc/diagnostics/error.d.ts +2 -2
- package/transform/compiler-cli/src/ngtsc/diagnostics/error_code.js +2 -2
- package/transform/compiler-cli/src/ngtsc/diagnostics/index.d.ts +0 -7
- package/transform/compiler-cli/src/ngtsc/diagnostics/index.js +0 -7
- package/transform/compiler-cli/src/ngtsc/imports/index.d.ts +0 -7
- package/transform/compiler-cli/src/ngtsc/imports/index.js +0 -7
- package/transform/compiler-cli/src/ngtsc/reflection/index.d.ts +0 -7
- package/transform/compiler-cli/src/ngtsc/reflection/index.js +0 -7
- package/transform/compiler-cli/src/ngtsc/reflection/src/host.d.ts +7 -2
- package/transform/compiler-cli/src/ngtsc/reflection/src/host.js +3 -1
- package/transform/compiler-cli/src/ngtsc/reflection/src/type_to_value.d.ts +2 -1
- package/transform/compiler-cli/src/ngtsc/reflection/src/type_to_value.js +16 -5
- package/transform/compiler-cli/src/ngtsc/reflection/src/typescript.d.ts +4 -3
- package/transform/compiler-cli/src/ngtsc/reflection/src/typescript.js +25 -9
- package/transform/compiler-cli/src/ngtsc/transform/index.d.ts +0 -7
- package/transform/compiler-cli/src/ngtsc/transform/index.js +0 -7
- package/transform/compiler-cli/src/ngtsc/transform/src/api.d.ts +18 -0
- package/transform/compiler-cli/src/ngtsc/transform/src/api.js +20 -0
- package/transform/compiler-cli/src/ngtsc/transform/src/utils.d.ts +1 -1
- package/transform/compiler-cli/src/ngtsc/transform/src/utils.js +35 -24
- package/transform/compiler-cli/src/ngtsc/translator/index.d.ts +0 -7
- package/transform/compiler-cli/src/ngtsc/translator/index.js +0 -7
- package/transform/compiler-cli/src/ngtsc/translator/src/api/ast_factory.d.ts +9 -1
- package/transform/compiler-cli/src/ngtsc/translator/src/import_manager.d.ts +21 -3
- package/transform/compiler-cli/src/ngtsc/translator/src/import_manager.js +13 -3
- package/transform/compiler-cli/src/ngtsc/translator/src/translator.d.ts +1 -0
- package/transform/compiler-cli/src/ngtsc/translator/src/translator.js +6 -0
- package/transform/compiler-cli/src/ngtsc/translator/src/ts_util.d.ts +12 -0
- package/transform/compiler-cli/src/ngtsc/translator/src/ts_util.js +27 -0
- package/transform/compiler-cli/src/ngtsc/translator/src/typescript_ast_factory.d.ts +1 -0
- package/transform/compiler-cli/src/ngtsc/translator/src/typescript_ast_factory.js +9 -1
- package/transform/index.d.ts +1 -1
- package/transform/injectable-transform.js +2 -2
|
@@ -28,7 +28,7 @@ class InjectableTransformerFactory {
|
|
|
28
28
|
this.options = options;
|
|
29
29
|
this.typeChecker = this.program.getTypeChecker();
|
|
30
30
|
this.reflectionHost = new reflection_1.TypeScriptReflectionHost(this.typeChecker);
|
|
31
|
-
this.handler = new injectable_1.InjectableDecoratorHandler(this.reflectionHost, false, !!this.options.strictCtorDeps, false);
|
|
31
|
+
this.handler = new injectable_1.InjectableDecoratorHandler(this.reflectionHost, false, !!this.options.strictCtorDeps, false, transform_1.CompilationMode.FULL);
|
|
32
32
|
}
|
|
33
33
|
getTransform() {
|
|
34
34
|
return (context) => this.transform(context);
|
|
@@ -214,7 +214,7 @@ class InjectableTransformerFactory {
|
|
|
214
214
|
return nodeArrayFromDecoratorsArray(filtered);
|
|
215
215
|
}
|
|
216
216
|
updateStatements(node, importManager) {
|
|
217
|
-
return (0, transform_1.addImports)(importManager, node);
|
|
217
|
+
return (0, transform_1.addImports)(typescript_1.default.factory, importManager, node);
|
|
218
218
|
}
|
|
219
219
|
}
|
|
220
220
|
exports.InjectableTransformerFactory = InjectableTransformerFactory;
|