Open probablytukars opened 11 months ago
This isn't the correct way to contribute to an open source project. Pull Requests are for submitting changes, not issues. And it's a good idea to include the cases that are failing in your issue to justify why the change needs to be made, rather than just saying that it does. I can't do anything with this code you've given me.
Sorry, never created a pull request before, but I created one now and the dif is only 7 characters and includes the use case where it broke too, hope this is ok!
@probablytukars I noticed that you deleted your Pull Request. If you would be interested in opening it again, I'll look into it and merge it if approved.
I was using LuaType.js for a personal project, and in my testing I found that there were some parsing errors, luckily I was able to make a fix, but note that some of the variables are changed.
I believe the only parts I changed are adding support for intersection type, and expanding the isPunc function to correctly catch all punctuation, otherwise it can fail on sub-types, of course in my test I removed whitespace before parsing, but adding these modifications it should still work with whitespace.