Skip to content

Add Types::not() to exclude types #494

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

Merged
merged 1 commit into from
May 2, 2025
Merged

Add Types::not() to exclude types #494

merged 1 commit into from
May 2, 2025

Conversation

chriszarate
Copy link
Member

Add a new non-primitive not type that allows us to exclude types from a wider type like any. This is useful as a type narrowing tool, and especially to exclude unserializable types like callable.

With some future type additions, we could probably move to remove any.

@chriszarate chriszarate requested a review from shekharnwagh May 2, 2025 16:36
Copy link
Contributor

github-actions bot commented May 2, 2025

Test this PR in WordPress Playground.

@chriszarate chriszarate merged commit 066f66b into trunk May 2, 2025
13 checks passed
@chriszarate chriszarate deleted the add/not-type branch May 2, 2025 17:04
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.

2 participants