-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Make @types/node a dev dependency on jest-worker #12544
Conversation
Hi @donatj! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks! |
I have now signed the CLA |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
There was a question on here by a user named I've created a tiny project to help illustrate the problem https://github.com/donatj/jest-worker-problem-example The actual code we're compiling is just var x : number = setTimeout(() => console.log("foo"), 1000); You can see that without jest-worker included this compiles fine With jest-worker included this fails to compile because including jest-worker includes @types/node which redefines setTimeout. |
Thanks for the detail. I deleted my original comment after I realize what the problem is. I am sorry for that. |
This PR is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 30 days. |
This PR was closed because it has been stalled for 14 days with no activity. Please open a new PR if the issue is still relevant, linking to this one. |
This PR was closed because it has been stalled for 14 days with no activity. Please open a new PR if the issue is still relevant, linking to this one. |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
npm requiring the jest-worker package is also requiring
@types/node
. This causes TypeScript to include @types/node for non-node projects.This is a problem because a number of things are different between the DOM and npm. Namely in a browser setTimeout returns a number instead of a handle.
Test plan
No code changes