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

Missing type guard argument on fromFalsy #252

Open
tvedtorama opened this issue Jan 18, 2022 · 1 comment
Open

Missing type guard argument on fromFalsy #252

tvedtorama opened this issue Jan 18, 2022 · 1 comment

Comments

@tvedtorama
Copy link

fromFalsy have this signature:

fromFalsy<V>(val: V|null|undefined): Maybe<V>;

This means that the following produces V=false|string, where it should be V=string:

fromFalsy(false | "some string")

I think the signature should be changed to:

fromFalsy<V>(val: V|null|undefined|false): Maybe<V>;
@ulfryk
Copy link
Member

ulfryk commented Nov 19, 2024

@tvedtorama please see #258

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

No branches or pull requests

2 participants