Improve `reportError`
Closed this issue · 4 comments
devinrhode2 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
qb20nh 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);
...
};
ArthurKa commented
Seems not like TypeScript.
mattpocock commented
Thanks for the research, that makes enough sense to me that we should close this.
devinrhode2 commented
This is marked completed but I'm curious what the final code is