Skip to content
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

Discriminate better with numericString #178

Merged
merged 1 commit into from May 30, 2023
Merged

Conversation

Xananax
Copy link
Contributor

@Xananax Xananax commented May 30, 2023

This PR allows the is.numericString assertion/type guard to not remove string from possible remaining values.

Fixes #176

I don't believe new tests are necessary.

The assertion

is `${number}`

isn't strictly correct, but I believe it's sufficient.

@Xananax
Copy link
Contributor Author

Xananax commented May 30, 2023

The tests fail, but they also fail on previous commits with the same crash, so I do not believe my changes are related

@sindresorhus sindresorhus merged commit 888e145 into sindresorhus:main May 30, 2023
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

is.numericString type guarding returns x is string and messes up typescript
2 participants