# edit_prediction: Skip type definition lookup for intrinsic TSX/JSX tags \(\#54666\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/f85cf72a4d59432a3b41a1fb138a2ae10c1225b5)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: f85cf72a4d59432a3b41a1fb138a2ae10c1225b5

Requested commit: f85cf72a4d59432a3b41a1fb138a2ae10c1225b5

Commit: f85cf72a4d59432a3b41a1fb138a2ae10c1225b5

Tree: 5796d9753d35431963cbe2538f8eb42cf0c37763

Author: Gaauwe Rombouts

Committer: GitHub

## Message

```
edit_prediction: Skip type definition lookup for intrinsic TSX/JSX tags (#54666)

Skip intrinsic TSX/JSX tag names when gathering identifiers for edit
prediction context.

I bisected a TypeScript regression to
https://github.com/zed-industries/zed/pull/49748. That change caused
edit prediction context to query `definition` / `typeDefinition` for
lowercase JSX tags like `p`, which could trigger incorrect unversioned
TypeScript diagnostics, such as `Cannot find name 'p'`.

This change filters those intrinsic tag names out while still keeping
user-defined component tags like `Component`.

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Closes #51316

Release Notes:

- Fixed a TypeScript issue that could show incorrect diagnostics caused
by edit prediction context lookups.

Co-authored-by: Ben Kunkle <ben@zed.dev>
```

## Parents

- [a710669e0385c770c23a0ffc92c132bb96b38fa5](https://git.cafe/gitcafe/zed/commit/a710669e0385c770c23a0ffc92c132bb96b38fa5?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/f85cf72a4d59432a3b41a1fb138a2ae10c1225b5?format=markdown)
