Skip to content

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

Merged
chriszarate merged 1 commit into
trunkfrom
add/not-type
May 2, 2025
Merged

Add Types::not() to exclude types#494
chriszarate merged 1 commit into
trunkfrom
add/not-type

Conversation

@chriszarate
Copy link
Copy Markdown
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
@github-actions
Copy link
Copy Markdown
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