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

Remove Present and replace with unknown; remove Args and Trigger and use TS Tuple #168

Merged
merged 13 commits into from
Jul 1, 2023

Conversation

axmmisaka
Copy link
Collaborator

@axmmisaka axmmisaka commented Jun 19, 2023

See #167

TODOs:

For reference:

I discovered what happened; such a type gymnastics moment
It is because typescript will infer T extends unknown to be null and it is still valid;
If we remove Present and still want to check against null, we make all T to be T extends NonNullable<unknown>
Or, we can just define Present as such...... (i.e. type Present = NonNullable<unknown>)?

But I don't think checking is entirely necessary, considering all tests are passing...... And we might be checking null already somewhere in the code possibly?

@axmmisaka axmmisaka requested a review from lhstrh July 1, 2023 19:51
Copy link
Member

@lhstrh lhstrh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@axmmisaka axmmisaka changed the title Remove Present entirely, and replace with unknown Remove Present and replace with unknown; remove Args and Trigger and use TS Tuple Jul 1, 2023
@axmmisaka axmmisaka merged commit 85e56da into master Jul 1, 2023
@axmmisaka axmmisaka deleted the axmmisaka/remove-present-replace-unknown branch July 25, 2023 20:43
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