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

Turn assertions into user-defined type guards #2456

Closed
novemberborn opened this issue Apr 14, 2020 · 0 comments · Fixed by #2704
Closed

Turn assertions into user-defined type guards #2456

novemberborn opened this issue Apr 14, 2020 · 0 comments · Fixed by #2704
Assignees
Labels
blocked waiting on something else to be resolved first help wanted scope:assertions scope:typescript

Comments

@novemberborn
Copy link
Member

Once #2455 is out of the way, we should turn our assertions into user-defined type guards wherever possible.

This may require some discussion to figure out the right types. Perhaps we should start off with some proposals in the TypeScript Playground.

@novemberborn novemberborn added help wanted blocked waiting on something else to be resolved first scope:assertions scope:typescript labels Apr 14, 2020
@novemberborn novemberborn self-assigned this Mar 7, 2021
novemberborn added a commit that referenced this issue Mar 7, 2021
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 added a commit that referenced this issue Mar 7, 2021
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked waiting on something else to be resolved first help wanted scope:assertions scope:typescript
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant