-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
feat: add missing node type guards #33
feat: add missing node type guards #33
Conversation
recreate all simple type guards
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fantastic, thanks for getting so much of this sent @RebeccaStevens! 🎉
Requesting changes to remove some excess functions. Very excited to see it come in!
Co-authored-by: Josh Goldberg <git@joshuakgoldberg.com>
ad3d59f
to
6ca9c81
Compare
I think this PR is ready other than for knip complaining. I'm not sure why it's complaining. |
...huh, yeah, me neither. Weird. I'm guessing it's an |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very close!
For the Knip issues, pending webpro-nl/knip#62, I guess you can add an explicit ignore
to the config file. 😞
This isn't as easy as you would think it would be. |
seems that knip has a bug and where these falsely report issues
Ignoring only the non-test files actually seems to resolve this. Those it's fragile as the files are ignored completely, not just issues ignored. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fantastic, thanks a million @RebeccaStevens! 🚀 Really appreciate you iterating with me & doing such a thorough job.
PR Checklist
isExpression
probably doesn't match all expressions #31isTextualLiteral
#32status: accepting prs
Overview
tsutils
tsutils
was last updatedisExpression
removedWhen making this PR, I noticed that it's probably possible to auto-generate a bunch of these type-guards; particularly with the ones defined in
simple.ts
andunion.ts
. This is probably worth looking into in future.Note: No additionally test have been added.