@angular/compiler-cli 13.0.0-next.1 → 13.0.0-next.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/bundles/index.js +20414 -0
- package/bundles/index.js.map +6 -0
- package/bundles/linker/babel/index.js +2384 -0
- package/bundles/linker/babel/index.js.map +6 -0
- package/bundles/linker/index.js +1849 -0
- package/bundles/linker/index.js.map +6 -0
- package/bundles/ngcc/index.js +16043 -0
- package/bundles/ngcc/index.js.map +6 -0
- package/bundles/ngcc/main-ngcc.js +16131 -0
- package/bundles/ngcc/main-ngcc.js.map +6 -0
- package/bundles/ngcc/src/execution/cluster/ngcc_cluster_worker.js +13855 -0
- package/bundles/ngcc/src/execution/cluster/ngcc_cluster_worker.js.map +6 -0
- package/bundles/ngcc/src/locking/lock_file_with_child_process/ngcc_lock_unlocker.js +334 -0
- package/bundles/ngcc/src/locking/lock_file_with_child_process/ngcc_lock_unlocker.js.map +6 -0
- package/bundles/private/bazel.js +97 -0
- package/bundles/private/bazel.js.map +6 -0
- package/bundles/private/localize.js +911 -0
- package/bundles/private/localize.js.map +6 -0
- package/bundles/private/migrations.js +2181 -0
- package/bundles/private/migrations.js.map +6 -0
- package/bundles/private/tooling.js +942 -0
- package/bundles/private/tooling.js.map +6 -0
- package/bundles/src/bin/ng_xi18n.js +20466 -0
- package/bundles/src/bin/ng_xi18n.js.map +6 -0
- package/bundles/src/bin/ngc.js +20468 -0
- package/bundles/src/bin/ngc.js.map +6 -0
- package/bundles_metadata.json +1 -0
- package/import_meta_url.d.ts +14 -0
- package/index.d.ts +4 -1
- package/linker/babel/src/ast/babel_ast_factory.d.ts +1 -8
- package/linker/babel/src/ast/babel_ast_host.d.ts +1 -1
- package/linker/babel/src/babel_core.d.ts +36 -0
- package/linker/babel/src/babel_declaration_scope.d.ts +1 -1
- package/linker/babel/src/babel_plugin.d.ts +1 -8
- package/linker/babel/src/es2015_linker_plugin.d.ts +2 -2
- package/linker/src/ast/typescript/typescript_ast_host.d.ts +1 -1
- package/linker/src/file_linker/emit_scopes/emit_scope.d.ts +1 -2
- package/linker/src/file_linker/emit_scopes/iife_emit_scope.d.ts +1 -1
- package/linker/src/file_linker/partial_linkers/partial_class_metadata_linker_1.d.ts +1 -2
- package/linker/src/file_linker/partial_linkers/partial_component_linker_1.d.ts +1 -2
- package/linker/src/file_linker/partial_linkers/partial_directive_linker_1.d.ts +1 -2
- package/linker/src/file_linker/partial_linkers/partial_factory_linker_1.d.ts +1 -2
- package/linker/src/file_linker/partial_linkers/partial_injectable_linker_1.d.ts +1 -2
- package/linker/src/file_linker/partial_linkers/partial_injector_linker_1.d.ts +1 -2
- package/linker/src/file_linker/partial_linkers/partial_linker.d.ts +1 -2
- package/linker/src/file_linker/partial_linkers/partial_linker_selector.d.ts +2 -2
- package/linker/src/file_linker/partial_linkers/partial_ng_module_linker_1.d.ts +1 -2
- package/linker/src/file_linker/partial_linkers/partial_pipe_linker_1.d.ts +1 -2
- package/linker/src/file_linker/partial_linkers/util.d.ts +1 -2
- package/ngcc/index.d.ts +15 -0
- package/ngcc/src/analysis/decoration_analyzer.d.ts +1 -1
- package/ngcc/src/analysis/module_with_providers_analyzer.d.ts +1 -1
- package/ngcc/src/analysis/ngcc_references_registry.d.ts +1 -1
- package/ngcc/src/analysis/ngcc_trait_compiler.d.ts +1 -1
- package/ngcc/src/analysis/private_declarations_analyzer.d.ts +1 -1
- package/ngcc/src/analysis/switch_marker_analyzer.d.ts +1 -1
- package/ngcc/src/analysis/types.d.ts +1 -1
- package/ngcc/src/dependencies/esm_dependency_host.d.ts +1 -1
- package/ngcc/src/execution/cluster/api.d.ts +5 -1
- package/ngcc/src/execution/cluster/master.d.ts +5 -3
- package/{src/ngtsc/logging/testing/index.d.ts → ngcc/src/execution/cluster/ngcc_cluster_worker.d.ts} +2 -2
- package/ngcc/src/host/commonjs_host.d.ts +1 -1
- package/ngcc/src/host/commonjs_umd_utils.d.ts +1 -1
- package/ngcc/src/host/delegating_host.d.ts +2 -2
- package/ngcc/src/host/esm2015_host.d.ts +1 -1
- package/ngcc/src/host/esm5_host.d.ts +2 -1
- package/ngcc/src/host/ngcc_host.d.ts +1 -1
- package/ngcc/src/host/umd_host.d.ts +1 -1
- package/ngcc/src/host/utils.d.ts +1 -1
- package/ngcc/src/locking/lock_file.d.ts +1 -1
- package/ngcc/src/locking/lock_file_with_child_process/index.d.ts +2 -0
- package/ngcc/src/locking/lock_file_with_child_process/{unlocker.d.ts → ngcc_lock_unlocker.d.ts} +1 -1
- package/ngcc/src/migrations/migration.d.ts +1 -1
- package/ngcc/src/migrations/missing_injectable_migration.d.ts +1 -1
- package/ngcc/src/migrations/undecorated_child_migration.d.ts +1 -1
- package/ngcc/src/migrations/undecorated_parent_migration.d.ts +1 -1
- package/ngcc/src/migrations/utils.d.ts +1 -1
- package/ngcc/src/packages/build_marker.d.ts +1 -1
- package/ngcc/src/packages/bundle_program.d.ts +1 -1
- package/ngcc/src/packages/configuration.d.ts +41 -4
- package/ngcc/src/packages/entry_point_bundle.d.ts +1 -1
- package/ngcc/src/packages/ngcc_compiler_host.d.ts +1 -1
- package/ngcc/src/packages/source_file_cache.d.ts +1 -1
- package/ngcc/src/packages/transformer.d.ts +1 -1
- package/ngcc/src/rendering/commonjs_rendering_formatter.d.ts +1 -1
- package/ngcc/src/rendering/dts_renderer.d.ts +1 -1
- package/ngcc/src/rendering/esm5_rendering_formatter.d.ts +1 -1
- package/ngcc/src/rendering/esm_rendering_formatter.d.ts +1 -1
- package/ngcc/src/rendering/renderer.d.ts +1 -1
- package/ngcc/src/rendering/rendering_formatter.d.ts +1 -1
- package/ngcc/src/rendering/source_maps.d.ts +3 -3
- package/ngcc/src/rendering/umd_rendering_formatter.d.ts +1 -1
- package/ngcc/src/rendering/utils.d.ts +1 -1
- package/ngcc/src/utils.d.ts +1 -1
- package/package.json +52 -11
- package/private/bazel.d.ts +13 -0
- package/private/localize.d.ts +15 -0
- package/private/migrations.d.ts +16 -0
- package/{src → private}/tooling.d.ts +2 -2
- package/src/{ngtsc/core/src/config.d.ts → bin/ng_xi18n.d.ts} +3 -2
- package/{ngcc/main-ivy-ngcc.d.ts → src/bin/ngc.d.ts} +2 -1
- package/src/diagnostics/translate_diagnostics.d.ts +1 -1
- package/src/extract_i18n.d.ts +0 -5
- package/src/main.d.ts +6 -6
- package/src/metadata/bundle_index_host.d.ts +1 -1
- package/src/metadata/bundler.d.ts +1 -1
- package/src/metadata/collector.d.ts +1 -1
- package/src/metadata/evaluator.d.ts +1 -1
- package/src/metadata/symbols.d.ts +1 -1
- package/src/ngtsc/annotations/src/component.d.ts +16 -1
- package/src/ngtsc/annotations/src/diagnostics.d.ts +1 -1
- package/src/ngtsc/annotations/src/directive.d.ts +1 -1
- package/src/ngtsc/annotations/src/metadata.d.ts +2 -2
- package/src/ngtsc/annotations/src/ng_module.d.ts +2 -4
- package/src/ngtsc/annotations/src/pipe.d.ts +1 -1
- package/src/ngtsc/annotations/src/util.d.ts +2 -4
- package/src/ngtsc/core/api/src/adapter.d.ts +1 -1
- package/src/ngtsc/core/api/src/interfaces.d.ts +2 -13
- package/src/ngtsc/core/api/src/options.d.ts +11 -2
- package/src/ngtsc/core/src/compiler.d.ts +13 -8
- package/src/ngtsc/core/src/host.d.ts +1 -1
- package/src/ngtsc/cycles/src/analyzer.d.ts +1 -1
- package/src/ngtsc/cycles/src/imports.d.ts +1 -1
- package/src/ngtsc/diagnostics/src/error.d.ts +1 -1
- package/src/ngtsc/diagnostics/src/error_code.d.ts +9 -0
- package/src/ngtsc/entry_point/src/generator.d.ts +1 -1
- package/src/ngtsc/entry_point/src/private_export_checker.d.ts +1 -1
- package/src/ngtsc/file_system/src/compiler_host.d.ts +1 -1
- package/src/ngtsc/file_system/src/logical.d.ts +1 -1
- package/src/ngtsc/file_system/src/util.d.ts +1 -1
- package/src/ngtsc/imports/src/alias.d.ts +1 -1
- package/src/ngtsc/imports/src/default.d.ts +1 -1
- package/src/ngtsc/imports/src/emitter.d.ts +1 -1
- package/src/ngtsc/imports/src/find_export.d.ts +1 -1
- package/src/ngtsc/imports/src/references.d.ts +1 -1
- package/src/ngtsc/imports/src/resolver.d.ts +1 -1
- package/src/ngtsc/incremental/api.d.ts +1 -1
- package/src/ngtsc/incremental/src/dependency_tracking.d.ts +1 -1
- package/src/ngtsc/incremental/src/incremental.d.ts +1 -1
- package/src/ngtsc/incremental/src/state.d.ts +1 -1
- package/src/ngtsc/incremental/src/strategy.d.ts +1 -1
- package/src/ngtsc/indexer/src/api.d.ts +5 -2
- package/src/ngtsc/metadata/src/api.d.ts +1 -1
- package/src/ngtsc/metadata/src/dts.d.ts +1 -1
- package/src/ngtsc/metadata/src/resource_registry.d.ts +1 -1
- package/src/ngtsc/metadata/src/util.d.ts +1 -1
- package/src/ngtsc/partial_evaluator/index.d.ts +1 -0
- package/src/ngtsc/partial_evaluator/src/builtin.d.ts +1 -1
- package/src/ngtsc/partial_evaluator/src/diagnostics.d.ts +1 -1
- package/src/ngtsc/partial_evaluator/src/dynamic.d.ts +1 -1
- package/src/ngtsc/partial_evaluator/src/interface.d.ts +1 -1
- package/src/ngtsc/partial_evaluator/src/interpreter.d.ts +1 -1
- package/src/ngtsc/partial_evaluator/src/result.d.ts +1 -1
- package/src/ngtsc/partial_evaluator/src/ts_helpers.d.ts +1 -1
- package/src/ngtsc/program.d.ts +1 -2
- package/src/ngtsc/program_driver/src/api.d.ts +1 -1
- package/src/ngtsc/program_driver/src/ts_create_program_driver.d.ts +1 -1
- package/src/ngtsc/reflection/src/host.d.ts +7 -7
- package/src/ngtsc/reflection/src/type_to_value.d.ts +1 -1
- package/src/ngtsc/reflection/src/typescript.d.ts +4 -4
- package/src/ngtsc/reflection/src/util.d.ts +1 -1
- package/src/ngtsc/resource/src/loader.d.ts +1 -1
- package/src/ngtsc/scope/src/local.d.ts +1 -1
- package/src/ngtsc/scope/src/typecheck.d.ts +1 -1
- package/src/ngtsc/shims/api.d.ts +1 -1
- package/src/ngtsc/shims/src/adapter.d.ts +1 -1
- package/src/ngtsc/shims/src/expando.d.ts +1 -1
- package/src/ngtsc/shims/src/factory_generator.d.ts +1 -1
- package/src/ngtsc/shims/src/reference_tagger.d.ts +1 -1
- package/src/ngtsc/shims/src/summary_generator.d.ts +1 -1
- package/src/ngtsc/switch/src/switch.d.ts +1 -1
- package/src/ngtsc/transform/src/alias.d.ts +1 -1
- package/src/ngtsc/transform/src/api.d.ts +3 -1
- package/src/ngtsc/transform/src/compilation.d.ts +3 -1
- package/src/ngtsc/transform/src/declaration.d.ts +1 -1
- package/src/ngtsc/transform/src/trait.d.ts +1 -1
- package/src/ngtsc/transform/src/transform.d.ts +1 -1
- package/src/ngtsc/transform/src/utils.d.ts +1 -1
- package/src/ngtsc/translator/src/import_manager.d.ts +1 -1
- package/src/ngtsc/translator/src/translator.d.ts +0 -1
- package/src/ngtsc/translator/src/type_translator.d.ts +1 -2
- package/src/ngtsc/translator/src/typescript_ast_factory.d.ts +1 -1
- package/src/ngtsc/translator/src/typescript_translator.d.ts +1 -1
- package/src/ngtsc/tsc_plugin.d.ts +1 -1
- package/src/ngtsc/typecheck/api/api.d.ts +22 -1
- package/src/ngtsc/typecheck/api/checker.d.ts +10 -7
- package/src/ngtsc/typecheck/api/context.d.ts +1 -1
- package/src/ngtsc/typecheck/api/scope.d.ts +1 -1
- package/src/ngtsc/typecheck/api/symbols.d.ts +1 -1
- package/src/ngtsc/typecheck/diagnostics/src/diagnostic.d.ts +2 -16
- package/src/ngtsc/typecheck/extended/api/api.d.ts +50 -0
- package/src/ngtsc/typecheck/extended/api/extended_template_checker.d.ts +19 -0
- package/src/ngtsc/{routing → typecheck/extended/api}/index.d.ts +3 -3
- package/src/ngtsc/typecheck/extended/checks/invalid_banana_in_box/index.d.ts +22 -0
- package/src/ngtsc/typecheck/extended/checks/nullish_coalescing_not_nullable/index.d.ts +23 -0
- package/src/ngtsc/typecheck/extended/index.d.ts +9 -0
- package/src/ngtsc/typecheck/extended/src/extended_template_checker.d.ts +18 -0
- package/src/ngtsc/typecheck/src/checker.d.ts +7 -8
- package/src/ngtsc/typecheck/src/comments.d.ts +1 -1
- package/src/ngtsc/typecheck/src/completion.d.ts +4 -6
- package/src/ngtsc/typecheck/src/context.d.ts +2 -3
- package/src/ngtsc/typecheck/src/diagnostics.d.ts +2 -3
- package/src/ngtsc/typecheck/src/dom.d.ts +1 -2
- package/src/ngtsc/typecheck/src/environment.d.ts +1 -1
- package/src/ngtsc/typecheck/src/expression.d.ts +1 -1
- package/src/ngtsc/typecheck/src/oob.d.ts +4 -6
- package/src/ngtsc/typecheck/src/shim.d.ts +1 -1
- package/src/ngtsc/typecheck/src/source.d.ts +1 -1
- package/src/ngtsc/typecheck/src/tcb_util.d.ts +1 -1
- package/src/ngtsc/typecheck/src/template_symbol_builder.d.ts +1 -1
- package/src/ngtsc/typecheck/src/ts_util.d.ts +1 -1
- package/src/ngtsc/typecheck/src/type_check_block.d.ts +1 -1
- package/src/ngtsc/typecheck/src/type_check_file.d.ts +1 -1
- package/src/ngtsc/typecheck/src/type_constructor.d.ts +1 -1
- package/src/ngtsc/typecheck/src/type_emitter.d.ts +1 -1
- package/src/ngtsc/typecheck/src/type_parameter_emitter.d.ts +2 -2
- package/src/ngtsc/util/src/typescript.d.ts +1 -1
- package/src/ngtsc/util/src/visitor.d.ts +1 -1
- package/src/perform_compile.d.ts +1 -1
- package/src/perform_watch.d.ts +1 -1
- package/src/transformers/api.d.ts +2 -5
- package/src/transformers/compiler_host.d.ts +1 -1
- package/src/transformers/{downlevel_decorators_transform.d.ts → downlevel_decorators_transform/downlevel_decorators_transform.d.ts} +3 -3
- package/src/transformers/downlevel_decorators_transform/index.d.ts +9 -0
- package/src/transformers/{patch_alias_reference_resolution.d.ts → downlevel_decorators_transform/patch_alias_reference_resolution.d.ts} +2 -2
- package/src/transformers/i18n.d.ts +1 -1
- package/src/transformers/inline_resources.d.ts +1 -1
- package/src/transformers/lower_expressions.d.ts +1 -1
- package/src/transformers/metadata_cache.d.ts +1 -1
- package/src/transformers/node_emitter.d.ts +2 -3
- package/src/transformers/node_emitter_transform.d.ts +1 -1
- package/src/transformers/program.d.ts +1 -1
- package/src/transformers/r3_metadata_transform.d.ts +1 -1
- package/src/transformers/r3_transform.d.ts +1 -1
- package/src/transformers/util.d.ts +1 -1
- package/index.js +0 -40
- package/linker/babel/index.js +0 -25
- package/linker/babel/src/ast/babel_ast_factory.js +0 -153
- package/linker/babel/src/ast/babel_ast_host.js +0 -181
- package/linker/babel/src/babel_declaration_scope.js +0 -67
- package/linker/babel/src/babel_plugin.js +0 -38
- package/linker/babel/src/es2015_linker_plugin.js +0 -183
- package/linker/babel/src/linker_plugin_options.js +0 -13
- package/linker/index.js +0 -27
- package/linker/src/ast/ast_host.js +0 -20
- package/linker/src/ast/ast_value.js +0 -299
- package/linker/src/ast/typescript/typescript_ast_host.js +0 -183
- package/linker/src/ast/utils.js +0 -31
- package/linker/src/fatal_linker_error.js +0 -49
- package/linker/src/file_linker/declaration_scope.js +0 -20
- package/linker/src/file_linker/emit_scopes/emit_scope.js +0 -57
- package/linker/src/file_linker/emit_scopes/iife_emit_scope.js +0 -51
- package/linker/src/file_linker/file_linker.js +0 -97
- package/linker/src/file_linker/get_source_file.js +0 -42
- package/linker/src/file_linker/linker_environment.js +0 -38
- package/linker/src/file_linker/linker_options.js +0 -29
- package/linker/src/file_linker/needs_linking.js +0 -41
- package/linker/src/file_linker/partial_linkers/partial_class_metadata_linker_1.js +0 -47
- package/linker/src/file_linker/partial_linkers/partial_component_linker_1.js +0 -210
- package/linker/src/file_linker/partial_linkers/partial_directive_linker_1.js +0 -154
- package/linker/src/file_linker/partial_linkers/partial_factory_linker_1.js +0 -70
- package/linker/src/file_linker/partial_linkers/partial_injectable_linker_1.js +0 -74
- package/linker/src/file_linker/partial_linkers/partial_injector_linker_1.js +0 -56
- package/linker/src/file_linker/partial_linkers/partial_linker.js +0 -13
- package/linker/src/file_linker/partial_linkers/partial_linker_selector.js +0 -194
- package/linker/src/file_linker/partial_linkers/partial_ng_module_linker_1.js +0 -126
- package/linker/src/file_linker/partial_linkers/partial_pipe_linker_1.js +0 -59
- package/linker/src/file_linker/partial_linkers/util.js +0 -95
- package/linker/src/file_linker/translator.js +0 -40
- package/linker/src/linker_import_generator.js +0 -43
- package/ngcc/index.js +0 -33
- package/ngcc/main-ivy-ngcc.js +0 -12
- package/ngcc/main-ngcc.js +0 -54
- package/ngcc/src/analysis/decoration_analyzer.js +0 -268
- package/ngcc/src/analysis/migration_host.js +0 -108
- package/ngcc/src/analysis/module_with_providers_analyzer.js +0 -197
- package/ngcc/src/analysis/ngcc_references_registry.js +0 -65
- package/ngcc/src/analysis/ngcc_trait_compiler.js +0 -117
- package/ngcc/src/analysis/private_declarations_analyzer.js +0 -63
- package/ngcc/src/analysis/switch_marker_analyzer.js +0 -50
- package/ngcc/src/analysis/types.js +0 -15
- package/ngcc/src/analysis/util.js +0 -36
- package/ngcc/src/command_line_options.js +0 -156
- package/ngcc/src/constants.js +0 -23
- package/ngcc/src/dependencies/commonjs_dependency_host.js +0 -129
- package/ngcc/src/dependencies/dependency_host.js +0 -143
- package/ngcc/src/dependencies/dependency_resolver.js +0 -180
- package/ngcc/src/dependencies/dts_dependency_host.js +0 -35
- package/ngcc/src/dependencies/esm_dependency_host.js +0 -307
- package/ngcc/src/dependencies/module_resolver.js +0 -269
- package/ngcc/src/dependencies/umd_dependency_host.js +0 -53
- package/ngcc/src/entry_point_finder/directory_walker_entry_point_finder.js +0 -70
- package/ngcc/src/entry_point_finder/entry_point_collector.js +0 -157
- package/ngcc/src/entry_point_finder/interface.js +0 -13
- package/ngcc/src/entry_point_finder/program_based_entry_point_finder.js +0 -132
- package/ngcc/src/entry_point_finder/targeted_entry_point_finder.js +0 -268
- package/ngcc/src/entry_point_finder/tracing_entry_point_finder.js +0 -78
- package/ngcc/src/entry_point_finder/utils.js +0 -234
- package/ngcc/src/execution/analyze_entry_points.js +0 -197
- package/ngcc/src/execution/api.js +0 -13
- package/ngcc/src/execution/cluster/api.js +0 -20
- package/ngcc/src/execution/cluster/executor.js +0 -52
- package/ngcc/src/execution/cluster/master.js +0 -311
- package/ngcc/src/execution/cluster/package_json_updater.js +0 -79
- package/ngcc/src/execution/cluster/utils.js +0 -77
- package/ngcc/src/execution/cluster/worker.js +0 -123
- package/ngcc/src/execution/create_compile_function.js +0 -76
- package/ngcc/src/execution/single_process_executor.js +0 -91
- package/ngcc/src/execution/tasks/api.js +0 -35
- package/ngcc/src/execution/tasks/completion.js +0 -79
- package/ngcc/src/execution/tasks/queues/base_task_queue.js +0 -120
- package/ngcc/src/execution/tasks/queues/parallel_task_queue.js +0 -87
- package/ngcc/src/execution/tasks/queues/serial_task_queue.js +0 -49
- package/ngcc/src/execution/tasks/utils.js +0 -167
- package/ngcc/src/host/commonjs_host.js +0 -261
- package/ngcc/src/host/commonjs_umd_utils.js +0 -210
- package/ngcc/src/host/delegating_host.js +0 -156
- package/ngcc/src/host/esm2015_host.js +0 -2441
- package/ngcc/src/host/esm5_host.js +0 -744
- package/ngcc/src/host/ngcc_host.js +0 -29
- package/ngcc/src/host/umd_host.js +0 -539
- package/ngcc/src/host/utils.js +0 -26
- package/ngcc/src/locking/async_locker.js +0 -121
- package/ngcc/src/locking/lock_file.js +0 -18
- package/ngcc/src/locking/lock_file_with_child_process/index.js +0 -93
- package/ngcc/src/locking/lock_file_with_child_process/unlocker.js +0 -46
- package/ngcc/src/locking/lock_file_with_child_process/util.js +0 -43
- package/ngcc/src/locking/sync_locker.js +0 -67
- package/ngcc/src/main.js +0 -163
- package/ngcc/src/migrations/migration.js +0 -13
- package/ngcc/src/migrations/missing_injectable_migration.js +0 -227
- package/ngcc/src/migrations/undecorated_child_migration.js +0 -90
- package/ngcc/src/migrations/undecorated_parent_migration.js +0 -103
- package/ngcc/src/migrations/utils.js +0 -137
- package/ngcc/src/ngcc_options.js +0 -135
- package/ngcc/src/packages/build_marker.js +0 -124
- package/ngcc/src/packages/bundle_program.js +0 -80
- package/ngcc/src/packages/configuration.js +0 -277
- package/ngcc/src/packages/entry_point.js +0 -267
- package/ngcc/src/packages/entry_point_bundle.js +0 -96
- package/ngcc/src/packages/entry_point_manifest.js +0 -207
- package/ngcc/src/packages/ngcc_compiler_host.js +0 -101
- package/ngcc/src/packages/patch_ts_expando_initializer.js +0 -174
- package/ngcc/src/packages/source_file_cache.js +0 -207
- package/ngcc/src/packages/transformer.js +0 -157
- package/ngcc/src/path_mappings.js +0 -27
- package/ngcc/src/rendering/commonjs_rendering_formatter.js +0 -106
- package/ngcc/src/rendering/dts_renderer.js +0 -170
- package/ngcc/src/rendering/esm5_rendering_formatter.js +0 -70
- package/ngcc/src/rendering/esm_rendering_formatter.js +0 -291
- package/ngcc/src/rendering/ngcc_import_rewriter.js +0 -49
- package/ngcc/src/rendering/renderer.js +0 -204
- package/ngcc/src/rendering/rendering_formatter.js +0 -15
- package/ngcc/src/rendering/source_maps.js +0 -68
- package/ngcc/src/rendering/umd_rendering_formatter.js +0 -326
- package/ngcc/src/rendering/utils.js +0 -35
- package/ngcc/src/utils.js +0 -182
- package/ngcc/src/writing/cleaning/cleaning_strategies.js +0 -80
- package/ngcc/src/writing/cleaning/package_cleaner.js +0 -126
- package/ngcc/src/writing/cleaning/utils.js +0 -30
- package/ngcc/src/writing/file_writer.js +0 -13
- package/ngcc/src/writing/in_place_file_writer.js +0 -90
- package/ngcc/src/writing/new_entry_point_file_writer.js +0 -214
- package/ngcc/src/writing/package_json_updater.js +0 -182
- package/src/diagnostics/translate_diagnostics.js +0 -61
- package/src/diagnostics/typescript_version.js +0 -96
- package/src/extract_i18n.js +0 -62
- package/src/language_services.js +0 -34
- package/src/main.js +0 -210
- package/src/metadata/bundle_index_host.js +0 -133
- package/src/metadata/bundler.js +0 -624
- package/src/metadata/collector.js +0 -799
- package/src/metadata/evaluator.js +0 -677
- package/src/metadata/index.js +0 -24
- package/src/metadata/index_writer.js +0 -80
- package/src/metadata/schema.js +0 -136
- package/src/metadata/symbols.js +0 -149
- package/src/ngtsc/annotations/index.js +0 -35
- package/src/ngtsc/annotations/src/api.js +0 -20
- package/src/ngtsc/annotations/src/component.js +0 -1283
- package/src/ngtsc/annotations/src/diagnostics.js +0 -174
- package/src/ngtsc/annotations/src/directive.js +0 -724
- package/src/ngtsc/annotations/src/factory.js +0 -32
- package/src/ngtsc/annotations/src/injectable.js +0 -277
- package/src/ngtsc/annotations/src/metadata.js +0 -159
- package/src/ngtsc/annotations/src/ng_module.js +0 -677
- package/src/ngtsc/annotations/src/pipe.js +0 -171
- package/src/ngtsc/annotations/src/references_registry.js +0 -38
- package/src/ngtsc/annotations/src/util.js +0 -566
- package/src/ngtsc/core/api/index.js +0 -25
- package/src/ngtsc/core/api/src/adapter.js +0 -20
- package/src/ngtsc/core/api/src/interfaces.js +0 -20
- package/src/ngtsc/core/api/src/options.js +0 -20
- package/src/ngtsc/core/api/src/public_options.js +0 -20
- package/src/ngtsc/core/index.js +0 -25
- package/src/ngtsc/core/src/compiler.js +0 -1077
- package/src/ngtsc/core/src/config.js +0 -28
- package/src/ngtsc/core/src/host.js +0 -273
- package/src/ngtsc/cycles/index.js +0 -26
- package/src/ngtsc/cycles/src/analyzer.js +0 -163
- package/src/ngtsc/cycles/src/imports.js +0 -175
- package/src/ngtsc/diagnostics/index.js +0 -33
- package/src/ngtsc/diagnostics/src/error.js +0 -69
- package/src/ngtsc/diagnostics/src/error_code.js +0 -226
- package/src/ngtsc/diagnostics/src/util.js +0 -35
- package/src/ngtsc/entry_point/index.js +0 -29
- package/src/ngtsc/entry_point/src/generator.js +0 -45
- package/src/ngtsc/entry_point/src/logic.js +0 -61
- package/src/ngtsc/entry_point/src/private_export_checker.js +0 -137
- package/src/ngtsc/entry_point/src/reference_graph.js +0 -91
- package/src/ngtsc/file_system/index.js +0 -45
- package/src/ngtsc/file_system/src/compiler_host.js +0 -80
- package/src/ngtsc/file_system/src/helpers.js +0 -135
- package/src/ngtsc/file_system/src/invalid_file_system.js +0 -120
- package/src/ngtsc/file_system/src/logical.js +0 -100
- package/src/ngtsc/file_system/src/node_js_file_system.js +0 -179
- package/src/ngtsc/file_system/src/types.js +0 -20
- package/src/ngtsc/file_system/src/util.js +0 -38
- package/src/ngtsc/file_system/testing/index.d.ts +0 -13
- package/src/ngtsc/file_system/testing/index.js +0 -32
- package/src/ngtsc/file_system/testing/src/mock_file_system.d.ts +0 -72
- package/src/ngtsc/file_system/testing/src/mock_file_system.js +0 -333
- package/src/ngtsc/file_system/testing/src/mock_file_system_native.d.ts +0 -16
- package/src/ngtsc/file_system/testing/src/mock_file_system_native.js +0 -85
- package/src/ngtsc/file_system/testing/src/mock_file_system_posix.d.ts +0 -13
- package/src/ngtsc/file_system/testing/src/mock_file_system_posix.js +0 -68
- package/src/ngtsc/file_system/testing/src/mock_file_system_windows.d.ts +0 -13
- package/src/ngtsc/file_system/testing/src/mock_file_system_windows.js +0 -68
- package/src/ngtsc/file_system/testing/src/test_helper.d.ts +0 -17
- package/src/ngtsc/file_system/testing/src/test_helper.js +0 -142
- package/src/ngtsc/imports/index.js +0 -43
- package/src/ngtsc/imports/src/alias.js +0 -158
- package/src/ngtsc/imports/src/core.js +0 -98
- package/src/ngtsc/imports/src/default.js +0 -153
- package/src/ngtsc/imports/src/emitter.js +0 -317
- package/src/ngtsc/imports/src/find_export.js +0 -82
- package/src/ngtsc/imports/src/reexport.js +0 -20
- package/src/ngtsc/imports/src/references.js +0 -171
- package/src/ngtsc/imports/src/resolver.js +0 -39
- package/src/ngtsc/incremental/api.js +0 -20
- package/src/ngtsc/incremental/index.js +0 -29
- package/src/ngtsc/incremental/semantic_graph/index.js +0 -34
- package/src/ngtsc/incremental/semantic_graph/src/api.js +0 -51
- package/src/ngtsc/incremental/semantic_graph/src/graph.js +0 -302
- package/src/ngtsc/incremental/semantic_graph/src/type_parameters.js +0 -55
- package/src/ngtsc/incremental/semantic_graph/src/util.js +0 -111
- package/src/ngtsc/incremental/src/dependency_tracking.js +0 -165
- package/src/ngtsc/incremental/src/incremental.js +0 -393
- package/src/ngtsc/incremental/src/noop.js +0 -26
- package/src/ngtsc/incremental/src/state.js +0 -30
- package/src/ngtsc/incremental/src/strategy.js +0 -99
- package/src/ngtsc/indexer/index.js +0 -27
- package/src/ngtsc/indexer/src/api.js +0 -45
- package/src/ngtsc/indexer/src/context.js +0 -40
- package/src/ngtsc/indexer/src/template.js +0 -328
- package/src/ngtsc/indexer/src/transform.js +0 -66
- package/src/ngtsc/logging/index.js +0 -25
- package/src/ngtsc/logging/src/console_logger.js +0 -75
- package/src/ngtsc/logging/src/logger.js +0 -28
- package/src/ngtsc/logging/testing/index.js +0 -23
- package/src/ngtsc/logging/testing/src/mock_logger.d.ts +0 -20
- package/src/ngtsc/logging/testing/src/mock_logger.js +0 -64
- package/src/ngtsc/metadata/index.js +0 -39
- package/src/ngtsc/metadata/src/api.js +0 -26
- package/src/ngtsc/metadata/src/dts.js +0 -168
- package/src/ngtsc/metadata/src/inheritance.js +0 -122
- package/src/ngtsc/metadata/src/property_mapping.js +0 -244
- package/src/ngtsc/metadata/src/registry.js +0 -133
- package/src/ngtsc/metadata/src/resource_registry.js +0 -109
- package/src/ngtsc/metadata/src/util.js +0 -275
- package/src/ngtsc/partial_evaluator/index.js +0 -31
- package/src/ngtsc/partial_evaluator/src/builtin.js +0 -125
- package/src/ngtsc/partial_evaluator/src/diagnostics.js +0 -193
- package/src/ngtsc/partial_evaluator/src/dynamic.js +0 -109
- package/src/ngtsc/partial_evaluator/src/interface.js +0 -42
- package/src/ngtsc/partial_evaluator/src/interpreter.js +0 -780
- package/src/ngtsc/partial_evaluator/src/known_declaration.js +0 -57
- package/src/ngtsc/partial_evaluator/src/result.js +0 -72
- package/src/ngtsc/partial_evaluator/src/ts_helpers.js +0 -121
- package/src/ngtsc/perf/index.js +0 -28
- package/src/ngtsc/perf/src/api.js +0 -291
- package/src/ngtsc/perf/src/clock.js +0 -30
- package/src/ngtsc/perf/src/noop.js +0 -37
- package/src/ngtsc/perf/src/recorder.js +0 -143
- package/src/ngtsc/program.js +0 -361
- package/src/ngtsc/program_driver/index.js +0 -25
- package/src/ngtsc/program_driver/src/api.js +0 -36
- package/src/ngtsc/program_driver/src/ts_create_program_driver.js +0 -200
- package/src/ngtsc/reflection/index.js +0 -36
- package/src/ngtsc/reflection/src/host.js +0 -88
- package/src/ngtsc/reflection/src/type_to_value.js +0 -259
- package/src/ngtsc/reflection/src/typescript.js +0 -641
- package/src/ngtsc/reflection/src/util.js +0 -37
- package/src/ngtsc/resource/index.js +0 -23
- package/src/ngtsc/resource/src/loader.js +0 -285
- package/src/ngtsc/routing/index.js +0 -26
- package/src/ngtsc/routing/src/analyzer.d.ts +0 -37
- package/src/ngtsc/routing/src/analyzer.js +0 -82
- package/src/ngtsc/routing/src/lazy.d.ts +0 -19
- package/src/ngtsc/routing/src/lazy.js +0 -239
- package/src/ngtsc/routing/src/route.d.ts +0 -23
- package/src/ngtsc/routing/src/route.js +0 -77
- package/src/ngtsc/scope/index.js +0 -29
- package/src/ngtsc/scope/src/api.js +0 -20
- package/src/ngtsc/scope/src/component_scope.js +0 -69
- package/src/ngtsc/scope/src/dependency.js +0 -201
- package/src/ngtsc/scope/src/local.js +0 -665
- package/src/ngtsc/scope/src/typecheck.js +0 -120
- package/src/ngtsc/shims/api.js +0 -13
- package/src/ngtsc/shims/index.js +0 -39
- package/src/ngtsc/shims/src/adapter.js +0 -266
- package/src/ngtsc/shims/src/expando.js +0 -147
- package/src/ngtsc/shims/src/factory_generator.js +0 -292
- package/src/ngtsc/shims/src/reference_tagger.js +0 -94
- package/src/ngtsc/shims/src/summary_generator.js +0 -101
- package/src/ngtsc/shims/src/util.js +0 -41
- package/src/ngtsc/sourcemaps/index.js +0 -27
- package/src/ngtsc/sourcemaps/src/content_origin.js +0 -48
- package/src/ngtsc/sourcemaps/src/raw_source_map.js +0 -13
- package/src/ngtsc/sourcemaps/src/segment_marker.js +0 -55
- package/src/ngtsc/sourcemaps/src/source_file.js +0 -519
- package/src/ngtsc/sourcemaps/src/source_file_loader.js +0 -234
- package/src/ngtsc/switch/index.js +0 -23
- package/src/ngtsc/switch/src/switch.js +0 -141
- package/src/ngtsc/transform/index.js +0 -36
- package/src/ngtsc/transform/src/alias.js +0 -46
- package/src/ngtsc/transform/src/api.js +0 -76
- package/src/ngtsc/transform/src/compilation.js +0 -820
- package/src/ngtsc/transform/src/declaration.js +0 -234
- package/src/ngtsc/transform/src/trait.js +0 -111
- package/src/ngtsc/transform/src/transform.js +0 -333
- package/src/ngtsc/transform/src/utils.js +0 -73
- package/src/ngtsc/translator/index.js +0 -37
- package/src/ngtsc/translator/src/api/ast_factory.js +0 -20
- package/src/ngtsc/translator/src/api/import_generator.js +0 -20
- package/src/ngtsc/translator/src/context.js +0 -47
- package/src/ngtsc/translator/src/import_manager.js +0 -77
- package/src/ngtsc/translator/src/translator.js +0 -353
- package/src/ngtsc/translator/src/type_translator.js +0 -223
- package/src/ngtsc/translator/src/typescript_ast_factory.js +0 -251
- package/src/ngtsc/translator/src/typescript_translator.js +0 -34
- package/src/ngtsc/tsc_plugin.js +0 -129
- package/src/ngtsc/typecheck/api/api.js +0 -20
- package/src/ngtsc/typecheck/api/checker.js +0 -44
- package/src/ngtsc/typecheck/api/completion.js +0 -29
- package/src/ngtsc/typecheck/api/context.js +0 -20
- package/src/ngtsc/typecheck/api/index.js +0 -27
- package/src/ngtsc/typecheck/api/scope.js +0 -20
- package/src/ngtsc/typecheck/api/symbols.js +0 -35
- package/src/ngtsc/typecheck/diagnostics/index.js +0 -23
- package/src/ngtsc/typecheck/diagnostics/src/diagnostic.js +0 -141
- package/src/ngtsc/typecheck/diagnostics/src/id.js +0 -37
- package/src/ngtsc/typecheck/index.js +0 -29
- package/src/ngtsc/typecheck/src/checker.js +0 -763
- package/src/ngtsc/typecheck/src/comments.js +0 -181
- package/src/ngtsc/typecheck/src/completion.js +0 -232
- package/src/ngtsc/typecheck/src/context.js +0 -424
- package/src/ngtsc/typecheck/src/diagnostics.js +0 -114
- package/src/ngtsc/typecheck/src/dom.js +0 -87
- package/src/ngtsc/typecheck/src/environment.js +0 -160
- package/src/ngtsc/typecheck/src/expression.js +0 -441
- package/src/ngtsc/typecheck/src/line_mappings.js +0 -77
- package/src/ngtsc/typecheck/src/oob.js +0 -181
- package/src/ngtsc/typecheck/src/shim.js +0 -52
- package/src/ngtsc/typecheck/src/source.js +0 -91
- package/src/ngtsc/typecheck/src/tcb_util.js +0 -165
- package/src/ngtsc/typecheck/src/template_semantics.js +0 -52
- package/src/ngtsc/typecheck/src/template_symbol_builder.js +0 -546
- package/src/ngtsc/typecheck/src/ts_util.js +0 -202
- package/src/ngtsc/typecheck/src/type_check_block.js +0 -2210
- package/src/ngtsc/typecheck/src/type_check_file.js +0 -115
- package/src/ngtsc/typecheck/src/type_constructor.js +0 -255
- package/src/ngtsc/typecheck/src/type_emitter.js +0 -164
- package/src/ngtsc/typecheck/src/type_parameter_emitter.js +0 -111
- package/src/ngtsc/util/src/path.js +0 -33
- package/src/ngtsc/util/src/typescript.js +0 -176
- package/src/ngtsc/util/src/visitor.js +0 -119
- package/src/ngtsc/xi18n/index.js +0 -22
- package/src/ngtsc/xi18n/src/context.js +0 -20
- package/src/perform_compile.js +0 -322
- package/src/perform_watch.js +0 -263
- package/src/tooling.js +0 -47
- package/src/transformers/api.js +0 -42
- package/src/transformers/compiler_host.js +0 -623
- package/src/transformers/downlevel_decorators_transform.js +0 -618
- package/src/transformers/entry_points.js +0 -25
- package/src/transformers/i18n.js +0 -76
- package/src/transformers/inline_resources.js +0 -287
- package/src/transformers/lower_expressions.js +0 -365
- package/src/transformers/metadata_cache.js +0 -96
- package/src/transformers/metadata_reader.js +0 -120
- package/src/transformers/node_emitter.js +0 -643
- package/src/transformers/node_emitter_transform.js +0 -88
- package/src/transformers/patch_alias_reference_resolution.js +0 -129
- package/src/transformers/program.js +0 -1000
- package/src/transformers/r3_metadata_transform.js +0 -73
- package/src/transformers/r3_transform.js +0 -44
- package/src/transformers/util.js +0 -122
- package/src/typescript_support.js +0 -74
- package/src/version.js +0 -28
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
8
|
/// <amd-module name="@angular/compiler-cli/src/ngtsc/reflection/src/type_to_value" />
|
|
9
|
-
import
|
|
9
|
+
import ts from 'typescript';
|
|
10
10
|
import { TypeValueReference } from './host';
|
|
11
11
|
/**
|
|
12
12
|
* Potentially convert a `ts.TypeNode` to a `TypeValueReference`, which indicates how to use the
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
8
|
/// <amd-module name="@angular/compiler-cli/src/ngtsc/reflection/src/typescript" />
|
|
9
|
-
import
|
|
9
|
+
import ts from 'typescript';
|
|
10
10
|
import { ClassDeclaration, ClassMember, CtorParameter, Declaration, DeclarationNode, Decorator, FunctionDefinition, Import, ReflectionHost } from './host';
|
|
11
11
|
/**
|
|
12
12
|
* reflector.ts implements static reflection of declarations using the TypeScript `ts.TypeChecker`.
|
|
@@ -29,7 +29,7 @@ export declare class TypeScriptReflectionHost implements ReflectionHost {
|
|
|
29
29
|
getDtsDeclaration(_: ClassDeclaration): ts.Declaration | null;
|
|
30
30
|
getInternalNameOfClass(clazz: ClassDeclaration): ts.Identifier;
|
|
31
31
|
getAdjacentNameOfClass(clazz: ClassDeclaration): ts.Identifier;
|
|
32
|
-
isStaticallyExported(
|
|
32
|
+
isStaticallyExported(decl: ts.Node): boolean;
|
|
33
33
|
protected getDirectImportOfIdentifier(id: ts.Identifier): Import | null;
|
|
34
34
|
/**
|
|
35
35
|
* Try to get the import info for this identifier as though it is a namespaced import.
|
|
@@ -57,9 +57,9 @@ export declare class TypeScriptReflectionHost implements ReflectionHost {
|
|
|
57
57
|
private _reflectDecorator;
|
|
58
58
|
private _reflectMember;
|
|
59
59
|
/**
|
|
60
|
-
* Get the set of
|
|
60
|
+
* Get the set of declarations declared in `file` which are exported.
|
|
61
61
|
*/
|
|
62
|
-
private
|
|
62
|
+
private getLocalExportedDeclarationsOfSourceFile;
|
|
63
63
|
}
|
|
64
64
|
export declare function reflectNameOfDeclaration(decl: ts.Declaration): string | null;
|
|
65
65
|
export declare function reflectIdentifierOfDeclaration(decl: ts.Declaration): ts.Identifier | null;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
8
|
/// <amd-module name="@angular/compiler-cli/src/ngtsc/reflection/src/util" />
|
|
9
|
-
import
|
|
9
|
+
import ts from 'typescript';
|
|
10
10
|
import { ClassDeclaration } from './host';
|
|
11
11
|
export declare function isNamedClassDeclaration(node: ts.Node): node is ClassDeclaration<ts.ClassDeclaration>;
|
|
12
12
|
export declare function isNamedFunctionDeclaration(node: ts.Node): node is ClassDeclaration<ts.FunctionDeclaration>;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
8
|
/// <amd-module name="@angular/compiler-cli/src/ngtsc/resource/src/loader" />
|
|
9
|
-
import
|
|
9
|
+
import ts from 'typescript';
|
|
10
10
|
import { ResourceLoader, ResourceLoaderContext } from '../../annotations';
|
|
11
11
|
import { NgCompilerAdapter } from '../../core/api';
|
|
12
12
|
/**
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
/// <amd-module name="@angular/compiler-cli/src/ngtsc/scope/src/local" />
|
|
9
9
|
import { SchemaMetadata } from '@angular/compiler';
|
|
10
|
-
import
|
|
10
|
+
import ts from 'typescript';
|
|
11
11
|
import { AliasingHost, Reexport, Reference, ReferenceEmitter } from '../../imports';
|
|
12
12
|
import { DirectiveMeta, MetadataReader, MetadataRegistry, NgModuleMeta, PipeMeta } from '../../metadata';
|
|
13
13
|
import { ClassDeclaration } from '../../reflection';
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
/// <amd-module name="@angular/compiler-cli/src/ngtsc/scope/src/typecheck" />
|
|
9
9
|
import { SchemaMetadata, SelectorMatcher } from '@angular/compiler';
|
|
10
|
-
import
|
|
10
|
+
import ts from 'typescript';
|
|
11
11
|
import { Reference } from '../../imports';
|
|
12
12
|
import { DirectiveMeta, MetadataReader } from '../../metadata';
|
|
13
13
|
import { ClassDeclaration } from '../../reflection';
|
package/src/ngtsc/shims/api.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
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
|
-
import
|
|
9
|
+
import ts from 'typescript';
|
|
10
10
|
import { AbsoluteFsPath } from '../file_system';
|
|
11
11
|
/**
|
|
12
12
|
* Generates a single shim file for the entire program.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
8
|
/// <amd-module name="@angular/compiler-cli/src/ngtsc/shims/src/adapter" />
|
|
9
|
-
import
|
|
9
|
+
import ts from 'typescript';
|
|
10
10
|
import { AbsoluteFsPath } from '../../file_system';
|
|
11
11
|
import { PerFileShimGenerator, TopLevelShimGenerator } from '../api';
|
|
12
12
|
/**
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
8
|
/// <amd-module name="@angular/compiler-cli/src/ngtsc/shims/src/expando" />
|
|
9
|
-
import
|
|
9
|
+
import ts from 'typescript';
|
|
10
10
|
import { AbsoluteFsPath } from '../../file_system';
|
|
11
11
|
/**
|
|
12
12
|
* A `Symbol` which is used to patch extension data onto `ts.SourceFile`s.
|
|
@@ -6,7 +6,7 @@
|
|
|
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
|
-
import
|
|
9
|
+
import ts from 'typescript';
|
|
10
10
|
import { AbsoluteFsPath } from '../../file_system';
|
|
11
11
|
import { ImportRewriter } from '../../imports';
|
|
12
12
|
import { FactoryInfo, FactoryTracker, ModuleInfo, PerFileShimGenerator } from '../api';
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
8
|
/// <amd-module name="@angular/compiler-cli/src/ngtsc/shims/src/reference_tagger" />
|
|
9
|
-
import
|
|
9
|
+
import ts from 'typescript';
|
|
10
10
|
/**
|
|
11
11
|
* Manipulates the `referencedFiles` property of `ts.SourceFile`s to add references to shim files
|
|
12
12
|
* for each original source file, causing the shims to be loaded into the program as well.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
8
|
/// <amd-module name="@angular/compiler-cli/src/ngtsc/shims/src/summary_generator" />
|
|
9
|
-
import
|
|
9
|
+
import ts from 'typescript';
|
|
10
10
|
import { AbsoluteFsPath } from '../../file_system';
|
|
11
11
|
import { PerFileShimGenerator } from '../api';
|
|
12
12
|
export declare class SummaryGenerator implements PerFileShimGenerator {
|
|
@@ -6,5 +6,5 @@
|
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
8
|
/// <amd-module name="@angular/compiler-cli/src/ngtsc/switch/src/switch" />
|
|
9
|
-
import
|
|
9
|
+
import ts from 'typescript';
|
|
10
10
|
export declare function ivySwitchTransform(_: ts.TransformationContext): ts.Transformer<ts.SourceFile>;
|
|
@@ -6,5 +6,5 @@
|
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
8
|
/// <amd-module name="@angular/compiler-cli/src/ngtsc/transform/src/alias" />
|
|
9
|
-
import
|
|
9
|
+
import ts from 'typescript';
|
|
10
10
|
export declare function aliasTransformFactory(exportStatements: Map<string, Map<string, [string, string]>>): ts.TransformerFactory<ts.SourceFile>;
|
|
@@ -7,13 +7,14 @@
|
|
|
7
7
|
*/
|
|
8
8
|
/// <amd-module name="@angular/compiler-cli/src/ngtsc/transform/src/api" />
|
|
9
9
|
import { ConstantPool, Expression, Statement, Type } from '@angular/compiler';
|
|
10
|
-
import
|
|
10
|
+
import ts from 'typescript';
|
|
11
11
|
import { Reexport } from '../../imports';
|
|
12
12
|
import { SemanticSymbol } from '../../incremental/semantic_graph';
|
|
13
13
|
import { IndexingContext } from '../../indexer';
|
|
14
14
|
import { ClassDeclaration, Decorator } from '../../reflection';
|
|
15
15
|
import { ImportManager } from '../../translator';
|
|
16
16
|
import { TypeCheckContext } from '../../typecheck/api';
|
|
17
|
+
import { ExtendedTemplateChecker } from '../../typecheck/extended/api';
|
|
17
18
|
import { Xi18nContext } from '../../xi18n';
|
|
18
19
|
/**
|
|
19
20
|
* Specifies the compilation mode that is used for the compilation.
|
|
@@ -159,6 +160,7 @@ export interface DecoratorHandler<D, A, S extends SemanticSymbol | null, R> {
|
|
|
159
160
|
*/
|
|
160
161
|
xi18n?(bundle: Xi18nContext, node: ClassDeclaration, analysis: Readonly<A>): void;
|
|
161
162
|
typeCheck?(ctx: TypeCheckContext, node: ClassDeclaration, analysis: Readonly<A>, resolution: Readonly<R>): void;
|
|
163
|
+
extendedTemplateCheck?(component: ts.ClassDeclaration, extendedTemplateChecker: ExtendedTemplateChecker): ts.Diagnostic[];
|
|
162
164
|
/**
|
|
163
165
|
* Generate a description of the field which should be added to the class, including any
|
|
164
166
|
* initialization code to be generated.
|
|
@@ -7,13 +7,14 @@
|
|
|
7
7
|
*/
|
|
8
8
|
/// <amd-module name="@angular/compiler-cli/src/ngtsc/transform/src/compilation" />
|
|
9
9
|
import { ConstantPool } from '@angular/compiler';
|
|
10
|
-
import
|
|
10
|
+
import ts from 'typescript';
|
|
11
11
|
import { IncrementalBuild } from '../../incremental/api';
|
|
12
12
|
import { SemanticDepGraphUpdater, SemanticSymbol } from '../../incremental/semantic_graph';
|
|
13
13
|
import { IndexingContext } from '../../indexer';
|
|
14
14
|
import { PerfRecorder } from '../../perf';
|
|
15
15
|
import { ClassDeclaration, DeclarationNode, Decorator, ReflectionHost } from '../../reflection';
|
|
16
16
|
import { ProgramTypeCheckAdapter, TypeCheckContext } from '../../typecheck/api';
|
|
17
|
+
import { ExtendedTemplateChecker } from '../../typecheck/extended/api';
|
|
17
18
|
import { Xi18nContext } from '../../xi18n';
|
|
18
19
|
import { CompilationMode, CompileResult, DecoratorHandler, HandlerFlags } from './api';
|
|
19
20
|
import { DtsTransformRegistry } from './declaration';
|
|
@@ -108,6 +109,7 @@ export declare class TraitCompiler implements ProgramTypeCheckAdapter {
|
|
|
108
109
|
* `ts.SourceFile`.
|
|
109
110
|
*/
|
|
110
111
|
typeCheck(sf: ts.SourceFile, ctx: TypeCheckContext): void;
|
|
112
|
+
extendedTemplateCheck(sf: ts.SourceFile, extendedTemplateChecker: ExtendedTemplateChecker): ts.Diagnostic[];
|
|
111
113
|
index(ctx: IndexingContext): void;
|
|
112
114
|
xi18n(bundle: Xi18nContext): void;
|
|
113
115
|
updateResources(clazz: DeclarationNode): void;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
/// <amd-module name="@angular/compiler-cli/src/ngtsc/transform/src/declaration" />
|
|
9
9
|
import { Type } from '@angular/compiler';
|
|
10
|
-
import
|
|
10
|
+
import ts from 'typescript';
|
|
11
11
|
import { ImportRewriter } from '../../imports';
|
|
12
12
|
import { ClassDeclaration } from '../../reflection';
|
|
13
13
|
import { ImportManager } from '../../translator';
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
8
|
/// <amd-module name="@angular/compiler-cli/src/ngtsc/transform/src/trait" />
|
|
9
|
-
import
|
|
9
|
+
import ts from 'typescript';
|
|
10
10
|
import { SemanticSymbol } from '../../incremental/semantic_graph';
|
|
11
11
|
import { DecoratorHandler, DetectResult } from './api';
|
|
12
12
|
export declare enum TraitState {
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
8
|
/// <amd-module name="@angular/compiler-cli/src/ngtsc/transform/src/transform" />
|
|
9
|
-
import
|
|
9
|
+
import ts from 'typescript';
|
|
10
10
|
import { DefaultImportTracker, ImportRewriter } from '../../imports';
|
|
11
11
|
import { PerfRecorder } from '../../perf';
|
|
12
12
|
import { ReflectionHost } from '../../reflection';
|
|
@@ -6,7 +6,7 @@
|
|
|
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
|
-
import
|
|
9
|
+
import ts from 'typescript';
|
|
10
10
|
import { ImportManager } from '../../translator';
|
|
11
11
|
/**
|
|
12
12
|
* Adds extra imports in the import manage for this source file, after the existing imports
|
|
@@ -6,7 +6,7 @@
|
|
|
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
|
-
import
|
|
9
|
+
import ts from 'typescript';
|
|
10
10
|
import { ImportRewriter } from '../../imports';
|
|
11
11
|
import { ImportGenerator, NamedImport } from './api/import_generator';
|
|
12
12
|
/**
|
|
@@ -36,7 +36,6 @@ export declare class ExpressionTranslatorVisitor<TStatement, TExpression> implem
|
|
|
36
36
|
visitWriteVarExpr(expr: o.WriteVarExpr, context: Context): TExpression;
|
|
37
37
|
visitWriteKeyExpr(expr: o.WriteKeyExpr, context: Context): TExpression;
|
|
38
38
|
visitWritePropExpr(expr: o.WritePropExpr, context: Context): TExpression;
|
|
39
|
-
visitInvokeMethodExpr(ast: o.InvokeMethodExpr, context: Context): TExpression;
|
|
40
39
|
visitInvokeFunctionExpr(ast: o.InvokeFunctionExpr, context: Context): TExpression;
|
|
41
40
|
visitTaggedTemplateExpr(ast: o.TaggedTemplateExpr, context: Context): TExpression;
|
|
42
41
|
visitInstantiateExpr(ast: o.InstantiateExpr, context: Context): TExpression;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
/// <amd-module name="@angular/compiler-cli/src/ngtsc/translator/src/type_translator" />
|
|
9
9
|
import * as o from '@angular/compiler';
|
|
10
|
-
import
|
|
10
|
+
import ts from 'typescript';
|
|
11
11
|
import { Context } from './context';
|
|
12
12
|
import { ImportManager } from './import_manager';
|
|
13
13
|
export declare function translateType(type: o.Type, imports: ImportManager): ts.TypeNode;
|
|
@@ -22,7 +22,6 @@ export declare class TypeTranslatorVisitor implements o.ExpressionVisitor, o.Typ
|
|
|
22
22
|
visitWriteVarExpr(expr: o.WriteVarExpr, context: Context): never;
|
|
23
23
|
visitWriteKeyExpr(expr: o.WriteKeyExpr, context: Context): never;
|
|
24
24
|
visitWritePropExpr(expr: o.WritePropExpr, context: Context): never;
|
|
25
|
-
visitInvokeMethodExpr(ast: o.InvokeMethodExpr, context: Context): never;
|
|
26
25
|
visitInvokeFunctionExpr(ast: o.InvokeFunctionExpr, context: Context): never;
|
|
27
26
|
visitTaggedTemplateExpr(ast: o.TaggedTemplateExpr, context: Context): never;
|
|
28
27
|
visitInstantiateExpr(ast: o.InstantiateExpr, context: Context): never;
|
|
@@ -6,7 +6,7 @@
|
|
|
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
|
-
import
|
|
9
|
+
import ts from 'typescript';
|
|
10
10
|
import { AstFactory, BinaryOperator, LeadingComment, ObjectLiteralProperty, SourceMapRange, TemplateLiteral, UnaryOperator, VariableDeclarationType } from './api/ast_factory';
|
|
11
11
|
/**
|
|
12
12
|
* A TypeScript flavoured implementation of the AstFactory.
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
/// <amd-module name="@angular/compiler-cli/src/ngtsc/translator/src/typescript_translator" />
|
|
9
9
|
import * as o from '@angular/compiler';
|
|
10
|
-
import
|
|
10
|
+
import ts from 'typescript';
|
|
11
11
|
import { ImportGenerator } from './api/import_generator';
|
|
12
12
|
import { TranslatorOptions } from './translator';
|
|
13
13
|
export declare function translateExpression(expression: o.Expression, imports: ImportGenerator<ts.Expression>, options?: TranslatorOptions<ts.Expression>): ts.Expression;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
8
|
/// <amd-module name="@angular/compiler-cli/src/ngtsc/tsc_plugin" />
|
|
9
|
-
import
|
|
9
|
+
import ts from 'typescript';
|
|
10
10
|
import { NgCompiler } from './core';
|
|
11
11
|
import { UnifiedModulesHost } from './core/api';
|
|
12
12
|
/**
|
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
*/
|
|
8
8
|
/// <amd-module name="@angular/compiler-cli/src/ngtsc/typecheck/api/api" />
|
|
9
9
|
import { AbsoluteSourceSpan, BoundTarget, DirectiveMeta, ParseSourceSpan, SchemaMetadata } from '@angular/compiler';
|
|
10
|
-
import
|
|
10
|
+
import ts from 'typescript';
|
|
11
|
+
import { ErrorCode } from '../../diagnostics';
|
|
11
12
|
import { Reference } from '../../imports';
|
|
12
13
|
import { ClassPropertyMapping, DirectiveTypeCheckMeta } from '../../metadata';
|
|
13
14
|
import { ClassDeclaration } from '../../reflection';
|
|
@@ -24,6 +25,26 @@ export interface TypeCheckableDirectiveMeta extends DirectiveMeta, DirectiveType
|
|
|
24
25
|
export declare type TemplateId = string & {
|
|
25
26
|
__brand: 'TemplateId';
|
|
26
27
|
};
|
|
28
|
+
/**
|
|
29
|
+
* A `ts.Diagnostic` with additional information about the diagnostic related to template
|
|
30
|
+
* type-checking.
|
|
31
|
+
*/
|
|
32
|
+
export interface TemplateDiagnostic extends ts.Diagnostic {
|
|
33
|
+
/**
|
|
34
|
+
* The component with the template that resulted in this diagnostic.
|
|
35
|
+
*/
|
|
36
|
+
componentFile: ts.SourceFile;
|
|
37
|
+
/**
|
|
38
|
+
* The template id of the component that resulted in this diagnostic.
|
|
39
|
+
*/
|
|
40
|
+
templateId: TemplateId;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* A `TemplateDiagnostic` with a specific error code.
|
|
44
|
+
*/
|
|
45
|
+
export declare type NgTemplateDiagnostic<T extends ErrorCode> = TemplateDiagnostic & {
|
|
46
|
+
__ngCode: T;
|
|
47
|
+
};
|
|
27
48
|
/**
|
|
28
49
|
* Metadata required in addition to a component class in order to generate a type check block (TCB)
|
|
29
50
|
* for that component.
|
|
@@ -6,12 +6,11 @@
|
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
8
|
/// <amd-module name="@angular/compiler-cli/src/ngtsc/typecheck/api/checker" />
|
|
9
|
-
import { AST, LiteralPrimitive,
|
|
9
|
+
import { AST, LiteralPrimitive, ParseSourceSpan, PropertyRead, SafePropertyRead, TmplAstElement, TmplAstNode, TmplAstTemplate, TmplAstTextAttribute } from '@angular/compiler';
|
|
10
10
|
import { AbsoluteFsPath } from '@angular/compiler-cli/src/ngtsc/file_system';
|
|
11
|
-
import
|
|
12
|
-
import * as ts from 'typescript';
|
|
11
|
+
import ts from 'typescript';
|
|
13
12
|
import { ErrorCode } from '../../diagnostics';
|
|
14
|
-
import { FullTemplateMapping, TypeCheckableDirectiveMeta } from './api';
|
|
13
|
+
import { FullTemplateMapping, NgTemplateDiagnostic, TypeCheckableDirectiveMeta } from './api';
|
|
15
14
|
import { GlobalCompletion } from './completion';
|
|
16
15
|
import { DirectiveInScope, PipeInScope } from './scope';
|
|
17
16
|
import { ElementSymbol, ShimLocation, Symbol, TemplateSymbol } from './symbols';
|
|
@@ -102,13 +101,13 @@ export interface TemplateTypeChecker {
|
|
|
102
101
|
* For the given expression node, retrieve a `ShimLocation` that can be used to perform
|
|
103
102
|
* autocompletion at that point in the expression, if such a location exists.
|
|
104
103
|
*/
|
|
105
|
-
getExpressionCompletionLocation(expr: PropertyRead | SafePropertyRead
|
|
104
|
+
getExpressionCompletionLocation(expr: PropertyRead | SafePropertyRead, component: ts.ClassDeclaration): ShimLocation | null;
|
|
106
105
|
/**
|
|
107
106
|
* For the given node represents a `LiteralPrimitive`(the `TextAttribute` represents a string
|
|
108
107
|
* literal), retrieve a `ShimLocation` that can be used to perform autocompletion at that point in
|
|
109
108
|
* the node, if such a location exists.
|
|
110
109
|
*/
|
|
111
|
-
getLiteralCompletionLocation(strNode: LiteralPrimitive |
|
|
110
|
+
getLiteralCompletionLocation(strNode: LiteralPrimitive | TmplAstTextAttribute, component: ts.ClassDeclaration): ShimLocation | null;
|
|
112
111
|
/**
|
|
113
112
|
* Get basic metadata on the directives which are in scope for the given component.
|
|
114
113
|
*/
|
|
@@ -134,6 +133,10 @@ export interface TemplateTypeChecker {
|
|
|
134
133
|
attribute: string;
|
|
135
134
|
property: string;
|
|
136
135
|
}[];
|
|
136
|
+
/**
|
|
137
|
+
* Retrieve any potential DOM events.
|
|
138
|
+
*/
|
|
139
|
+
getPotentialDomEvents(tagName: string): string[];
|
|
137
140
|
/**
|
|
138
141
|
* Retrieve the type checking engine's metadata for the given directive class, if available.
|
|
139
142
|
*/
|
|
@@ -151,7 +154,7 @@ export interface TemplateTypeChecker {
|
|
|
151
154
|
start: number;
|
|
152
155
|
end: number;
|
|
153
156
|
sourceFile: ts.SourceFile;
|
|
154
|
-
}[]):
|
|
157
|
+
}[]): NgTemplateDiagnostic<T>;
|
|
155
158
|
}
|
|
156
159
|
/**
|
|
157
160
|
* Describes the scope of the caller's interest in template type-checking results.
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
/// <amd-module name="@angular/compiler-cli/src/ngtsc/typecheck/api/context" />
|
|
9
9
|
import { ParseError, ParseSourceFile, R3TargetBinder, SchemaMetadata, TmplAstNode } from '@angular/compiler';
|
|
10
|
-
import
|
|
10
|
+
import ts from 'typescript';
|
|
11
11
|
import { Reference } from '../../imports';
|
|
12
12
|
import { ClassDeclaration } from '../../reflection';
|
|
13
13
|
import { TemplateSourceMapping, TypeCheckableDirectiveMeta } from './api';
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
8
|
/// <amd-module name="@angular/compiler-cli/src/ngtsc/typecheck/api/scope" />
|
|
9
|
-
import
|
|
9
|
+
import ts from 'typescript';
|
|
10
10
|
import { ClassDeclaration } from '../../reflection';
|
|
11
11
|
import { SymbolWithValueDeclaration } from '../../util/src/typescript';
|
|
12
12
|
/**
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
/// <amd-module name="@angular/compiler-cli/src/ngtsc/typecheck/api/symbols" />
|
|
9
9
|
import { TmplAstElement, TmplAstReference, TmplAstTemplate, TmplAstVariable } from '@angular/compiler';
|
|
10
|
-
import
|
|
10
|
+
import ts from 'typescript';
|
|
11
11
|
import { AbsoluteFsPath } from '../../file_system';
|
|
12
12
|
import { SymbolWithValueDeclaration } from '../../util/src/typescript';
|
|
13
13
|
import { DirectiveInScope } from './scope';
|
|
@@ -7,22 +7,8 @@
|
|
|
7
7
|
*/
|
|
8
8
|
/// <amd-module name="@angular/compiler-cli/src/ngtsc/typecheck/diagnostics/src/diagnostic" />
|
|
9
9
|
import { ParseSourceSpan } from '@angular/compiler';
|
|
10
|
-
import
|
|
11
|
-
import { TemplateId, TemplateSourceMapping } from '../../api';
|
|
12
|
-
/**
|
|
13
|
-
* A `ts.Diagnostic` with additional information about the diagnostic related to template
|
|
14
|
-
* type-checking.
|
|
15
|
-
*/
|
|
16
|
-
export interface TemplateDiagnostic extends ts.Diagnostic {
|
|
17
|
-
/**
|
|
18
|
-
* The component with the template that resulted in this diagnostic.
|
|
19
|
-
*/
|
|
20
|
-
componentFile: ts.SourceFile;
|
|
21
|
-
/**
|
|
22
|
-
* The template id of the component that resulted in this diagnostic.
|
|
23
|
-
*/
|
|
24
|
-
templateId: TemplateId;
|
|
25
|
-
}
|
|
10
|
+
import ts from 'typescript';
|
|
11
|
+
import { TemplateDiagnostic, TemplateId, TemplateSourceMapping } from '../../api';
|
|
26
12
|
/**
|
|
27
13
|
* Constructs a `ts.Diagnostic` for a given `ParseSourceSpan` within a template.
|
|
28
14
|
*/
|
|
@@ -0,0 +1,50 @@
|
|
|
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
|
+
/// <amd-module name="@angular/compiler-cli/src/ngtsc/typecheck/extended/api/api" />
|
|
9
|
+
import { AST, TmplAstNode } from '@angular/compiler';
|
|
10
|
+
import ts from 'typescript';
|
|
11
|
+
import { ErrorCode } from '../../../diagnostics';
|
|
12
|
+
import { NgTemplateDiagnostic, TemplateTypeChecker } from '../../api';
|
|
13
|
+
/**
|
|
14
|
+
* A Template Check receives information about the template it's checking and returns
|
|
15
|
+
* information about the diagnostics to be generated.
|
|
16
|
+
*/
|
|
17
|
+
export interface TemplateCheck<T extends ErrorCode> {
|
|
18
|
+
/** Unique template check code, used for configuration and searching the error. */
|
|
19
|
+
code: T;
|
|
20
|
+
/** Runs check and returns information about the diagnostics to be generated. */
|
|
21
|
+
run(ctx: TemplateContext, component: ts.ClassDeclaration, template: TmplAstNode[]): NgTemplateDiagnostic<T>[];
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* The TemplateContext provided to a Template Check to get diagnostic information.
|
|
25
|
+
*/
|
|
26
|
+
export interface TemplateContext {
|
|
27
|
+
/** Interface that provides information about template nodes. */
|
|
28
|
+
templateTypeChecker: TemplateTypeChecker;
|
|
29
|
+
/**
|
|
30
|
+
* TypeScript interface that provides type information about symbols that appear
|
|
31
|
+
* in the template (it is not to query types outside the Angular component).
|
|
32
|
+
*/
|
|
33
|
+
typeChecker: ts.TypeChecker;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* This abstract class provides a base implementation for the run method.
|
|
37
|
+
*/
|
|
38
|
+
export declare abstract class TemplateCheckWithVisitor<T extends ErrorCode> implements TemplateCheck<T> {
|
|
39
|
+
abstract code: T;
|
|
40
|
+
/**
|
|
41
|
+
* Base implementation for run function, visits all nodes in template and calls
|
|
42
|
+
* `visitNode()` for each one.
|
|
43
|
+
*/
|
|
44
|
+
run(ctx: TemplateContext, component: ts.ClassDeclaration, template: TmplAstNode[]): NgTemplateDiagnostic<T>[];
|
|
45
|
+
/**
|
|
46
|
+
* Visit a TmplAstNode or AST node of the template. Authors should override this
|
|
47
|
+
* method to implement the check and return diagnostics.
|
|
48
|
+
*/
|
|
49
|
+
abstract visitNode(ctx: TemplateContext, component: ts.ClassDeclaration, node: TmplAstNode | AST): NgTemplateDiagnostic<T>[];
|
|
50
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
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
|
+
/// <amd-module name="@angular/compiler-cli/src/ngtsc/typecheck/extended/api/extended_template_checker" />
|
|
9
|
+
import ts from 'typescript';
|
|
10
|
+
import { TemplateDiagnostic } from '../../api';
|
|
11
|
+
/**
|
|
12
|
+
* Interface to generate extended template diangostics from the component tempaltes.
|
|
13
|
+
*/
|
|
14
|
+
export interface ExtendedTemplateChecker {
|
|
15
|
+
/**
|
|
16
|
+
* Run `TemplateCheck`s for a component and return the generated `ts.Diagnostic`s.
|
|
17
|
+
*/
|
|
18
|
+
getDiagnosticsForComponent(component: ts.ClassDeclaration): TemplateDiagnostic[];
|
|
19
|
+
}
|
|
@@ -5,6 +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
|
-
/// <amd-module name="@angular/compiler-cli/src/ngtsc/
|
|
9
|
-
export
|
|
10
|
-
export
|
|
8
|
+
/// <amd-module name="@angular/compiler-cli/src/ngtsc/typecheck/extended/api" />
|
|
9
|
+
export * from './api';
|
|
10
|
+
export * from './extended_template_checker';
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
/// <amd-module name="@angular/compiler-cli/src/ngtsc/typecheck/extended/checks/invalid_banana_in_box" />
|
|
9
|
+
import { AST, TmplAstNode } from '@angular/compiler';
|
|
10
|
+
import ts from 'typescript';
|
|
11
|
+
import { ErrorCode } from '../../../../diagnostics';
|
|
12
|
+
import { NgTemplateDiagnostic } from '../../../api';
|
|
13
|
+
import { TemplateCheckWithVisitor, TemplateContext } from '../../api';
|
|
14
|
+
/**
|
|
15
|
+
* Ensures the two-way binding syntax is correct.
|
|
16
|
+
* Parentheses should be inside the brackets "[()]".
|
|
17
|
+
* Will return diagnostic information when "([])" is found.
|
|
18
|
+
*/
|
|
19
|
+
export declare class InvalidBananaInBoxCheck extends TemplateCheckWithVisitor<ErrorCode.INVALID_BANANA_IN_BOX> {
|
|
20
|
+
code: ErrorCode.INVALID_BANANA_IN_BOX;
|
|
21
|
+
visitNode(ctx: TemplateContext, component: ts.ClassDeclaration, node: TmplAstNode | AST): NgTemplateDiagnostic<ErrorCode.INVALID_BANANA_IN_BOX>[];
|
|
22
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
/// <amd-module name="@angular/compiler-cli/src/ngtsc/typecheck/extended/checks/nullish_coalescing_not_nullable" />
|
|
9
|
+
import { AST, TmplAstNode } from '@angular/compiler';
|
|
10
|
+
import ts from 'typescript';
|
|
11
|
+
import { ErrorCode } from '../../../../diagnostics';
|
|
12
|
+
import { NgTemplateDiagnostic } from '../../../api';
|
|
13
|
+
import { TemplateCheckWithVisitor, TemplateContext } from '../../api';
|
|
14
|
+
/**
|
|
15
|
+
* Ensures the left side of a nullish coalescing operation is nullable.
|
|
16
|
+
* Returns diagnostics for the cases where the operator is useless.
|
|
17
|
+
* This check should only be use if `strictNullChecks` is enabled,
|
|
18
|
+
* otherwise it would produce inaccurate results.
|
|
19
|
+
*/
|
|
20
|
+
export declare class NullishCoalescingNotNullableCheck extends TemplateCheckWithVisitor<ErrorCode.NULLISH_COALESCING_NOT_NULLABLE> {
|
|
21
|
+
code: ErrorCode.NULLISH_COALESCING_NOT_NULLABLE;
|
|
22
|
+
visitNode(ctx: TemplateContext, component: ts.ClassDeclaration, node: TmplAstNode | AST): NgTemplateDiagnostic<ErrorCode.NULLISH_COALESCING_NOT_NULLABLE>[];
|
|
23
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
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
|
+
/// <amd-module name="@angular/compiler-cli/src/ngtsc/typecheck/extended" />
|
|
9
|
+
export { ExtendedTemplateCheckerImpl } from './src/extended_template_checker';
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
/// <amd-module name="@angular/compiler-cli/src/ngtsc/typecheck/extended/src/extended_template_checker" />
|
|
9
|
+
import ts from 'typescript';
|
|
10
|
+
import { ErrorCode } from '../../../diagnostics';
|
|
11
|
+
import { TemplateDiagnostic, TemplateTypeChecker } from '../../api';
|
|
12
|
+
import { ExtendedTemplateChecker, TemplateCheck } from '../api';
|
|
13
|
+
export declare class ExtendedTemplateCheckerImpl implements ExtendedTemplateChecker {
|
|
14
|
+
private readonly templateChecks;
|
|
15
|
+
private ctx;
|
|
16
|
+
constructor(templateTypeChecker: TemplateTypeChecker, typeChecker: ts.TypeChecker, templateChecks: TemplateCheck<ErrorCode>[]);
|
|
17
|
+
getDiagnosticsForComponent(component: ts.ClassDeclaration): TemplateDiagnostic[];
|
|
18
|
+
}
|