Inlay hint for querySelector() way too long
The type hint for an `EventTarget.querySelector()` expression is way too long. It shows a union of `Element` and a bunch of SVG element types:
The above uses soft wrapping (secondary bug: the name "foo" is soft-wrapped in between the two O's!).
Without soft wrapping, the expression is several scroll-pages to the right:
Code to reproduce:
```js
const div = document.createElement('div');
div.addEventListener('click', e => {
const foo = e.currentTarget.querySelector('.foo');
foo?.remove();
});
div.addEventListener('click', e => {
const foo = e.currentTarget.querySelector('.foo');
foo?.remove();
});
```
This gets very annoying in code dealing with HTML elements.
Please sign in to leave a comment.
The issue is tracked at https://youtrack.jetbrains.com/issue/WEB-59322/Crazy-long-Type-annotation-inlay-hints-in-JavaScript, please follow it for updates