Improve `reportError`
devinrhode2 opened this issue · comments
Devin Rhode commented
lib.dom has this code:
declare function reportError(e: any): void;
This would be better:
/**
* The `reportError()` global method may be used to report errors
* to the console or global event handlers,
* emulating an uncaught JavaScript exception.
*
* https://developer.mozilla.org/en-US/docs/Web/API/reportError
*/
declare function reportError(e: Error): void;
mdn docs:
https://developer.mozilla.org/en-US/docs/Web/API/reportError
Yoo Taejong commented
It is defined as any
on the html spec
https://html.spec.whatwg.org/multipage/webappapis.html#windoworworkerglobalscope-mixin
interface mixin WindowOrWorkerGlobalScope {
...
undefined reportError(any e);
...
};