Closed viceice closed 2 years ago
Hi @viceice! Thanks for the report.
Unfortunately, naming collisions will tend to happen when there are different implementations which define the same sort of thing (ie. Node
). This is generally not an issue, but I understand that when global types are introduced, it can pose an issue with TypeScript.
In these cases, it's generally best practice to simply handle it the way that you have. Alternatively, you can also alias the type in the import statement.
Example: import { HTMLElement as NhpHTMLElement } from 'node-html-parser'
Hope that helps!
That don't help, as we can't use that import for esm modules 😕
Currently the
HTMLElement
isn't compatible with the globalHTMLElement
from thedom
lib from typescript. I'm not able to exclude the dom typings, because they are coming from a transitiv dependencyI would propose two solution:
HTMLElement
class to not iterfere with interface