Closed bandaloo closed 3 years ago
Thanks for proactively submitting this PR! See my comments.
Looks good! Last request: Is there a test you can add that passes after this change but fails before this change?
I added a test that only passes with the never
change to the generator, which I learned is only needed with the --strict
compilation mode (but I think that's how most people use TypeScript anyways). In doing so, I also realized that the original typescript test does not fail if there are type errors! That's because tsc
has no problem handing you a js file even if there were type errors, and the type errors get logged to stdout. I fixed this too. (That's how I made the mistake of lopping off the NearleyToken
interface and felt confident because the tests still passed, because type errors weren't caught in the tests.)
Merged! Thanks so much!
Let's watch out for any TS-related issues reported in the next few days… I'm always super paranoid about changes like this. But I think we - really, you - did a great job here. :)
This is a much less invasive fix that resolves #527