Skip to content

Turn assertions into type guards #2704

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
Mar 7, 2021
Merged

Turn assertions into type guards #2704

merged 1 commit into from
Mar 7, 2021

Conversation

novemberborn
Copy link
Member

Update the deepEqual, like, false, true and is assertions so they can be used as type guards. Fixes #2456.

Change the deepEqual, like and is assertions so the actual and expected parameters can be typed separately. Fixes #2580.

Update the `deepEqual`, `like`, `false`, `true` and `is` assertions so
they can be used as type guards. Fixes #2456.

Change the `deepEqual`, `like` and `is` assertions so the actual and
expected parameters can be typed separately. Fixes #2580.
@novemberborn novemberborn merged commit 5eea608 into main Mar 7, 2021
@novemberborn novemberborn deleted the type-guards branch March 7, 2021 16:32
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.

change deepEqual (actual: ValueType, expected: ValueType) to (any, any) Turn assertions into user-defined type guards
1 participant