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

Proposal: Upgrade type signature for is.infinite(), is.integer(), is.safeInteger() #147

Closed
younho9 opened this issue Jan 3, 2022 · 6 comments

Comments

@younho9
Copy link

younho9 commented Jan 3, 2022

is.infinite(), is.integer() and is.safeInteger() could provide more strongly-typed number type using type-fest.

See sindresorhus/ts-extras#23

@younho9 younho9 changed the title Proposal: Upgrade type signature for is.infinite(), is.integer(), is.safeInteger() using type-fest Proposal: Upgrade type signature for is.infinite(), is.integer(), is.safeInteger() Jan 3, 2022
@younho9
Copy link
Author

younho9 commented Jan 3, 2022

Also, There is is.infinite(), but no is.finite().

@sindresorhus
Copy link
Owner

PR welcome to both suggestions.

@sindresorhus
Copy link
Owner

The types should be copy-pasted from type-fest to https://github.com/sindresorhus/is/blob/main/source/types.ts

@younho9
Copy link
Author

younho9 commented Jan 5, 2022

Since the Integer type in type-fest is using the template literal type, more than 4.1 versions of the typescript are required. 😅

@sindresorhus
Copy link
Owner

That's fine.

@sindresorhus
Copy link
Owner

We could not find a way to make it work: #152

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants