Skip to content

How should we type lift? #442

@robounohito

Description

@robounohito

Hi guys,

Can someone explain how lift typings suppose to work?

Even basic case not working:

const test = lift(add)(inc, dec)(2);

lift correctly infers arity 2 (<number, number, number>), but then it fails to typecheck with:

Argument of type 'inc_0' is not assignable to parameter of type 'List<number>'

For whatever reason it expects inc and dec to return List<number> instead of number.

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