Skip to content

curry no longer works with map #111

@AndrewSouthpaw

Description

@AndrewSouthpaw

Repro:

it("does not type curry correctly", () => {
  type Foo = { id: string; name: string };
  const transform = curry((name: string, id: string): Foo => ({ id: id, name: name }));
  const b: Foo[] = map(transform("my name"))(["a"]);

  expect(b).toEqual([{ id: "a", name: "my name" }]);
});

gets this error:

TS2322: Type ((x: never) => never)[] is not assignable to type Foo[]
Type (x: never) => never is not assignable to type Foo

But the runtime passes.

I'm guessing this breakage may be related to #106?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions