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

Typescript @types/node conflict #45

Closed
3axap4eHko opened this issue Aug 13, 2021 · 3 comments
Closed

Typescript @types/node conflict #45

3axap4eHko opened this issue Aug 13, 2021 · 3 comments

Comments

@3axap4eHko
Copy link

file node_modules/jdenticon/types/env.d.ts brings a conflict with @types/node by global interface Buffer { }

@dmester
Copy link
Owner

dmester commented Aug 14, 2021

The duplicated Buffer interface is intentional, to avoid an explicit dependency to @types/node. Developers using Jdenticon on Node will most likely reference @types/node, and declaration merging should then take care of merging the interfaces. For developers not using Node, Buffer will just resolve to the empty interface.

The reason for not having an explicit dependency to @types/node is mainly the setTimeout issue, where the Node declaration is conflicting with the browser definition.

Do you get an actual build error caused by the interface?

@dmester
Copy link
Owner

dmester commented Aug 14, 2021

Never mind, found out that there are changes to the v16 Node typings breaking the Jdenticon typings. I will have a look at it. Thanks for reporting the issue!

@dmester
Copy link
Owner

dmester commented Aug 14, 2021

Types updated in v3.1.1.

@dmester dmester closed this as completed Aug 14, 2021
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