Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This library should not depend DOM types #142

Open
2 tasks done
khokm opened this issue Apr 29, 2024 · 1 comment
Open
2 tasks done

This library should not depend DOM types #142

khokm opened this issue Apr 29, 2024 · 1 comment

Comments

@khokm
Copy link

khokm commented Apr 29, 2024

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the bug has not already been reported

Fastify version

4

Plugin version

No response

Node.js version

20

Operating system

Windows

Operating system version (i.e. 20.04, 11.3, 10)

10

Description

This library depends on DOM types, which was introduced by #59.
The dom types was included to support this property:

domNode?: HTMLElement | null | undefined;

I don't see a reason why should domNode accept an HTMLElement interface in first place, because there there is nothing in Nodejs that implements this interface.

Can we remove domNode property, or replace it with unknown/any type at least? any type would be the best, because it makes it compatible with current code, so there is no need to bump major version.

Link to code that reproduces the bug

No response

Expected Behavior

No response

@mcollina
Copy link
Member

Thanks for reporting! Would you like to send a Pull Request to address this issue? Remember to add unit tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants