google / google/closure-compiler
MediaQueryListEvent is an unknown type
- Dominant language
- JavaScript
- Stars
- 7.7k
- Forks
- 1.2k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 6
Description
I'm getting the following error when trying to use the MediaQueryListEvent type:
**WARNING - [JSC_UNRECOGNIZED_TYPE_ERROR] Bad type annotation. Unknown type MediaQueryListEvent**
Code:
```
/**
* Handle MediaQueryList change event
* @param {MediaQueryListEvent} ev
*/
handleChange(ev) {
...
}
```
The code passes type checking in VSCode and 'Go to Definition' works.
I'm running "google-closure-compiler": "^20210601.0.0"
It looks like MediaQueryListEvent has been around for a while (https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryListEvent) so maybe it's just a missing extern?
I've tried suppressing the warning for now by adding `@suppress {checkTypes}`, but that doesn't seem to work.
Contributor guide
Assessment
This issue has not been assessed yet.