Basic info:
- Node.js version: N/A
- jsdom version: latest
Minimal reproduction case
const { VirtualConsole } = require("jsdom");
const virtualConsole = new VirtualConsole();
virtualConsole.on("jsdomError", error => {
if (error.type === "this error type doesn't exist") {
console.log("Typescript should warn me here!");
}
});
I filed a PR with @types/jsdom at DefinitelyTyped/DefinitelyTyped#66630. I would like the jsdom team to take a look and discuss how we can better enumerate the jsdomError types. In my PR I note "There is no single enumeration of error type strings. It is not clear if jsdom considers this part of a stable API surface." Please give commentary on this. Are the strings going to be "stable" within a non-major version bump? It's not part of the API surface and not defined in DefinitelyTyped, so it is not guaranteed.
Basic info:
Minimal reproduction case
I filed a PR with
@types/jsdomat DefinitelyTyped/DefinitelyTyped#66630. I would like the jsdom team to take a look and discuss how we can better enumerate the jsdomError types. In my PR I note "There is no single enumeration of error type strings. It is not clear if jsdom considers this part of a stable API surface." Please give commentary on this. Are the strings going to be "stable" within a non-major version bump? It's not part of the API surface and not defined in DefinitelyTyped, so it is not guaranteed.