-
Notifications
You must be signed in to change notification settings - Fork 41
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
Bug: Infinite loop adding | boolean to a union typed parameter #1284
Comments
👋 Thanks for trying out TypeStat! When I try the same
If I run function yjsTrace(where: string, source: boolean | Y.YMapEvent<unknown> | boolean | boolean | boolean | boolean | boolean | boolean, what: Y.YMapEvent<unknown>) { Filed #1285. Is that the same (and only) issue you're seeing locally? If not, could you please post a full reproduction that I can run locally? |
Hi,
Apologies: I was running TypeStat locally, having copied the prsm.js file into a ./src directory to test what TypeStat does, but then pointed you to the file where it is located on GitHub when filing the error report.
So to confirm, the issue you found is the same and only issue I am seeing.
Thanks for your quick response – good luck with finding the problem.
Nigel
|
Swell, thanks! Copying the report from #1285: 🐛 Bug Report
Actual BehaviorOriginal code: function yjsTrace(where, source, what) { Result from TypeStat: function yjsTrace(where: string, source: boolean | Y.YMapEvent<unknown> | boolean | boolean | boolean | boolean | boolean | boolean, what: Y.YMapEvent<unknown>) { Expected Behaviorfunction yjsTrace(where: string, source: boolean | Y.YMapEvent<unknown>, what: Y.YMapEvent<unknown>) { ReproductionSee #1284. |
@vzipp could you please post a reproduction? It's good to know you're experiencing a variation of this issue, but I can't help you if I have no idea what the rest of your project looks like 🙂 |
…1481) <!-- 👋 Hi, thanks for sending a PR to TypeStat! 💖. Please fill out all fields below and make sure each item is true and [x] checked. Otherwise we may not be able to review your PR. --> ## PR Checklist - [x] Addresses an existing open issue: fixes #1447 - I think it also fixes #1284 - [x] That issue was marked as [`status: accepting prs`](https://github.com/JoshuaKGoldberg/TypeStat/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22) - [x] Steps in [CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/TypeStat/blob/main/.github/CONTRIBUTING.md) were taken 😹 ## Overview <!-- Description of what is changed and how the code change does that. --> It was this small change in the end?? Note, `async function navigateTo(): Promise<boolean> | boolean {` and `async function navigateTo2(): Promise<boolean> | boolean {` are wrong. Both should return only `Promise<boolean>`. I can remove those from the test but I wanted to keep them to see, the difference. Co-authored-by: rubiesonthesky <rubiesonthesky>
🐛 Bug Report
Actual Behavior
It looks like TypeStat has ended up in an infinite loop.
Expected Behavior
File processed
Reproduction
Source javascript file is at https://github.com/micrology/prsm/blob/master/js/prsm.js
typestat.json:
Console log:
The text was updated successfully, but these errors were encountered: