Skip to content

Missing type guard argument on fromFalsy #252

@tvedtorama

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

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