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 · 0 comments
Open

Missing type guard argument on fromFalsy #252

tvedtorama opened this issue Jan 18, 2022 · 0 comments

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>;
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

1 participant