angular-cn/packages/language-service/ivy/test
Andrew Scott d466db8285 fix(language-service): Do not include $event parameter in reference results (#40158)
Given the template
`<div (click)="doSomething($event)"></div>`

If you request references for the `$event`, the results include both `$event` and `(click)="doSomething($event)"`.

This happens because in the TCB, `$event` is passed to the `subscribe`/`addEventListener`
function as an argument. So when we ask typescript to give us the references, we
get the result from the usage in the subscribe body as well as the one passed in as an argument.

This commit adds an identifier to the `$event` parameter in the TCB so
that the result returned from `getReferencesAtPosition` can be
identified and filtered out.

fixes #40157

PR Close #40158
2021-01-05 10:07:20 -08:00
..
legacy fix(language-service): shorthand syntax with variables (#40239) 2020-12-22 14:50:22 -08:00
BUILD.bazel test(language-service): introduce new virtual testing environment (#39594) 2020-11-17 11:59:56 -08:00
compiler_spec.ts fix(language-service): force compileNonExportedClasses: false in LS (#40092) 2020-12-14 10:09:21 -08:00
completions_spec.ts feat(language-service): completions for structural directives (#40032) 2020-12-14 12:08:41 -08:00
definitions_spec.ts refactor(compiler-cli): Enable pipe information when checkTypeOfPipes=false (#39555) 2020-12-11 16:19:15 -08:00
diagnostic_spec.ts refactor(compiler-cli): move template parse errors to TemplateData (#40026) 2020-12-15 13:30:52 -08:00
env.ts fix(compiler-cli): correct incremental behavior even with broken imports (#39923) 2020-12-03 13:42:13 -08:00
mock_host.ts test(language-service): introduce new virtual testing environment (#39594) 2020-11-17 11:59:56 -08:00
quick_info_spec.ts refactor(compiler-cli): Enable pipe information when checkTypeOfPipes=false (#39555) 2020-12-11 16:19:15 -08:00
references_spec.ts fix(language-service): Do not include $event parameter in reference results (#40158) 2021-01-05 10:07:20 -08:00
test_utils.ts refactor(compiler-cli): Enable pipe information when checkTypeOfPipes=false (#39555) 2020-12-11 16:19:15 -08:00
type_definitions_spec.ts refactor(compiler-cli): Enable pipe information when checkTypeOfPipes=false (#39555) 2020-12-11 16:19:15 -08:00