-
-
Notifications
You must be signed in to change notification settings - Fork 900
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
@types/uuid references @types/node #328
@types/uuid references @types/node #328
Comments
@sam-s4s thanks for reporting this. I am currently trying to make this library esmodule ready and in the process I also want to improve TypeScript support. Could you provide me with a bit more detailed steps to reproduce or sample code/commands where things fall apart for you? |
Oh that would be excellent :) So the problem for me is purely in the DefinitelyTyped But as I'm doing browser development (not making a node app) I can't use anything from here, and the presence of those types breaks things like This is a problem that has come up a few times before in other projects, and it's one of the pains of the ecosystem :( It normally just requires someone to sort of the types to remove that dependency. Let me know if you need any more info, and thank you for the reply! |
If you have a create-react-app put the following in your declare module 'uuid/v4' {
export default function uuid() {}
} |
A warning that this change has broken Typescript in our app! More info here: DefinitelyTyped/DefinitelyTyped#41814 (comment) |
Thank you for doing this - my problem is solved <3 |
|
Unfortunately I'm trying to use this library with Typescript, so I need to use
@types/uuid
, but that contains a reference toBuffer
inglobals.d.ts
which means it pulls in@types/node
, which breaks my build. I'm writing code for browsers, not node.There would be a few possible fixes for this, including just removing the reference to
Buffer
and just usingArray
/ArrayLike
- or creating an interface forBuffer
instead of pulling in the one from node...The text was updated successfully, but these errors were encountered: