angular-cn/packages/compiler-cli
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
..
integrationtest refactor(core): add top 10 runtime error codes (#39188) 2020-10-28 10:05:01 -07:00
linker feat(compiler-cli): expose function to allow short-circuiting of linking (#40137) 2020-12-22 14:53:02 -08:00
ngcc refactor(compiler-cli): make `TypeCheckingScopeRegistry` a general utility (#40032) 2020-12-14 12:08:41 -08:00
src fix(language-service): Do not include $event parameter in reference results (#40158) 2021-01-05 10:07:20 -08:00
test feat(compiler-cli): expose function to allow short-circuiting of linking (#40137) 2020-12-22 14:53:02 -08:00
BUILD.bazel refactor(compiler-cli): include linker entry-points in NPM package (#40180) 2020-12-22 11:48:11 -08:00
index.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
package.json build: support building with TypeScript 4.1 (#39571) 2020-11-25 11:10:01 -08:00
tsconfig-build.json build: reference zone.js from source directly instead of npm. (#33046) 2019-11-06 00:48:34 +00:00
tsconfig.json perf(ivy): ngcc - only find dependencies when targeting a single entry-point (#30525) 2019-07-09 09:40:46 -07:00