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

Fix is-empty return type #552

Merged
merged 1 commit into from May 6, 2023
Merged

Fix is-empty return type #552

merged 1 commit into from May 6, 2023

Conversation

benasher44
Copy link
Contributor

@benasher44 benasher44 commented Apr 27, 2023

I think the idea was for ReturnFalseValues to represent values that could return false, but the effect is that the type checker sees these as "always returns false". Really, string and any[] should be in the same category as object and should be treated as "needs further inspection"

@benasher44
Copy link
Contributor Author

I tried using the [any, ...any] syntax to preserve ReturnFalseValues for the "array with at least one" case, but I wasn't able to get it working.

@benasher44 benasher44 changed the title Fix is-empty types Fix is-empty type assertion Apr 27, 2023
@benasher44 benasher44 changed the title Fix is-empty type assertion Fix is-empty type guard Apr 27, 2023
@benasher44 benasher44 changed the title Fix is-empty type guard Fix is-empty return type Apr 28, 2023
@angus-c angus-c merged commit 3375646 into angus-c:master May 6, 2023
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.

None yet

2 participants