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

IsTuple returns Type | never instead of true | false #353

Closed
Beraliv opened this issue Mar 3, 2023 · 1 comment
Closed

IsTuple returns Type | never instead of true | false #353

Beraliv opened this issue Mar 3, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@Beraliv
Copy link
Collaborator

Beraliv commented Mar 3, 2023

Summary

IsTuple returns Type | never instead of true | false but should another way round

Why

All type checkers (IsAny, IsNever, IsUnknown and IsTuple) expect to return true or false.

There are other types Exact and NonEmptyObject that need to return Type | never as they are used to validate whether 1. types are exact and 2. type is empty object. never provides a way to show TS error in these cases.

@Beraliv Beraliv added the enhancement New feature or request label Mar 16, 2023
@Beraliv
Copy link
Collaborator Author

Beraliv commented Apr 6, 2024

I'll put it on hold for now since there doesn't seem to be much demand

@Beraliv Beraliv closed this as completed Apr 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant