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

Shorthand for P.not(P.nullish) #154

Closed
gkiely opened this issue Apr 22, 2023 · 2 comments
Closed

Shorthand for P.not(P.nullish) #154

gkiely opened this issue Apr 22, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@gkiely
Copy link

gkiely commented Apr 22, 2023

Is your feature request related to a problem? Please describe.
Requiring 2 commands to check if something is non-nullish P.not(P.nullish)

Describe the solution you'd like
A shorthand P.nonNullish so developers do not have to use 2 commands P.not(P.nullish) and get intellisense when using P.

@gkiely gkiely added the enhancement New feature or request label Apr 22, 2023
@JUSTIVE
Copy link
Contributor

JUSTIVE commented May 21, 2023

Agree with this idea, but I suggest P.some for P.nonNullish, and P.none for P.nullish(names borrowed from Option). if It would be not familiar to js developers, I think we can leave those names just for aliases.

@gvergnaud
Copy link
Owner

Closing as a duplicate of #60

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants