angular-cn/packages/language-service/ivy
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
..
test fix(language-service): Do not include $event parameter in reference results (#40158) 2021-01-05 10:07:20 -08:00
BUILD.bazel feat(language-service): complete attributes on elements (#40032) 2020-12-14 12:08:41 -08:00
adapters.ts refactor(language-service): language_service_adapter -> adapters (#39619) 2020-11-17 14:45:09 -08:00
attribute_completions.ts feat(language-service): completions for structural directives (#40032) 2020-12-14 12:08:41 -08:00
compiler_factory.ts fix(compiler-cli): track poisoned scopes with a flag (#39923) 2020-12-03 13:42:13 -08:00
completions.ts feat(language-service): completions for structural directives (#40032) 2020-12-14 12:08:41 -08:00
definitions.ts refactor(language-service): add context to template target system (#40032) 2020-12-14 12:08:40 -08:00
display_parts.ts feat(language-service): complete attributes on elements (#40032) 2020-12-14 12:08:41 -08:00
language_service.ts feat(language-service): complete attributes on elements (#40032) 2020-12-14 12:08:41 -08:00
quick_info.ts refactor(compiler-cli): Enable pipe information when checkTypeOfPipes=false (#39555) 2020-12-11 16:19:15 -08:00
references.ts fix(language-service): Do not include $event parameter in reference results (#40158) 2021-01-05 10:07:20 -08:00
template_target.ts fix(language-service): shorthand syntax with variables (#40239) 2020-12-22 14:50:22 -08:00
ts_plugin.ts feat(language-service): implement autocompletion for global properties (Ivy) (#39250) 2020-12-04 10:19:45 -08:00
ts_utils.ts fix(language-service): Do not include $event parameter in reference results (#40158) 2021-01-05 10:07:20 -08:00
utils.ts fix(language-service): shorthand syntax with variables (#40239) 2020-12-22 14:50:22 -08:00