angular/packages/compiler-cli/test/ngtsc
Kristiyan Kostadinov 4e9244990a fix(compiler-cli): more accurate diagnostics for host binding parser errors (#58870)
Currently host bindings are in a bit of a weird state, because their source spans all point to the root object literal, rather than the individual expression. This is tricky to handle at the moment, because the object is being passed around as a `Record<string, string>` since the compiler needs to support both JIT and non-JIT environments, and because the AOT compiler evaluates the entire literal rather than doing it expression-by-expression. As a result, when we report errors in one of the host bindings, we end up highlighting the entire expression which can be very noisy in an IDE.

These changes aim to report a more accurate error for the most common case where the `host` object is initialized to a `string -> string` object literal by matching the failing expression to one of the property initializers. Note that this isn't 100% reliable, because we can't map cases like `host: SOME_CONST`, but it's still better than the current setup.

PR Close #58870
2024-11-25 15:25:48 +00:00
..
doc_extraction fix(compiler-cli): correct extraction of generics from type aliases (#58548) 2024-11-08 17:15:06 +00:00
authoring_diagnostics_spec.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
authoring_inputs_spec.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
authoring_models_spec.ts refactor(compiler-cli): Migrate manually ngtsc tests to standalone by default (#58169) 2024-10-15 16:05:14 +00:00
authoring_outputs_spec.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
authoring_queries_spec.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
BUILD.bazel test: replace fake_core with real @angular/core output (#54650) 2024-03-06 12:34:38 +01:00
component_indexing_spec.ts refactor(compiler-cli): Migrate manually ngtsc tests to standalone by default (#58160) 2024-10-14 14:58:58 +00:00
defer_spec.ts fix(compiler-cli): defer symbols only used in types (#58104) 2024-10-07 08:26:07 -07:00
env.ts build: remove usages of useDefineForClassFields: false (#58297) 2024-10-28 12:26:05 -07:00
extended_template_diagnostics_spec.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
hmr_spec.ts refactor(compiler): trigger hmr load on initialization (#58465) 2024-11-01 19:14:16 +00:00
host_directives_spec.ts refactor(compiler): update compliance tests. (#58238) 2024-10-24 12:44:12 -07:00
imports_spec.ts refactor(compiler-cli): Migrate manually ngtsc tests to standalone by default (#58160) 2024-10-14 14:58:58 +00:00
incremental_error_spec.ts refactor(compiler-cli): Migrate manually ngtsc tests to standalone by default (#58160) 2024-10-14 14:58:58 +00:00
incremental_semantic_changes_spec.ts refactor(compiler-cli): Migrate manually ngtsc tests to standalone by default (#58160) 2024-10-14 14:58:58 +00:00
incremental_spec.ts refactor(compiler-cli): Migrate manually ngtsc tests to standalone by default (#58160) 2024-10-14 14:58:58 +00:00
incremental_typecheck_spec.ts refactor(compiler-cli): Migrate manually ngtsc tests to standalone by default (#58160) 2024-10-14 14:58:58 +00:00
local_compilation_spec.ts refactor(compiler): update compliance tests. (#58238) 2024-10-24 12:44:12 -07:00
ls_typecheck_helpers_spec.ts refactor(compiler-cli): Migrate manually ngtsc tests to standalone by default (#58160) 2024-10-14 14:58:58 +00:00
monorepo_spec.ts refactor(compiler-cli): Migrate manually ngtsc tests to standalone by default (#58160) 2024-10-14 14:58:58 +00:00
ngtsc_spec.ts fix(compiler-cli): more accurate diagnostics for host binding parser errors (#58870) 2024-11-25 15:25:48 +00:00
scope_spec.ts refactor(compiler-cli): Migrate manually ngtsc tests to standalone by default (#58160) 2024-10-14 14:58:58 +00:00
sourcemap_utils.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
standalone_spec.ts refactor(compiler-cli): Migrate manually ngtsc tests to standalone by default (#58160) 2024-10-14 14:58:58 +00:00
template_mapping_spec.ts refactor(compiler-cli): Migrate manually ngtsc tests to standalone by default (#58160) 2024-10-14 14:58:58 +00:00
template_typecheck_spec.ts fix(compiler-cli): report individual diagnostics for unused imports (#58589) 2024-11-11 15:31:00 +00:00
util.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
xi18n_spec.ts refactor(compiler-cli): Migrate manually ngtsc tests to standalone by default (#58160) 2024-10-14 14:58:58 +00:00