Skip to content

Missing type guard argument on fromFalsy #252

Description

@tvedtorama

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions