selfrefactor / rambdax

Extended version of Rambda
https://selfrefactor.github.io/rambdax
MIT License
221 stars 26 forks source link

piped isn't properly typed #63

Closed asktree closed 3 years ago

asktree commented 3 years ago

I made a screencast in place of a written issue with written examples: https://www.loom.com/share/3ffe89519d2c4d45b982fe9142993d6d

TLDW const example = R.piped(1, x => x) Expected: example has type number Actual: example has type unknown

Other libraries do not require manual typing in the data-first case because it is not needed. See fp-ts's pipe (which has the same API as piped, dont let the name confuse you)

selfrefactor commented 3 years ago

I still haven't watch your record, but I will do.

What I can say for now is that I added your example to piped-spec.ts and it seems fine:

 it('issue #63', () => {
    const result = piped(1, x => x)

    result // $ExpectType number
  })
asktree commented 3 years ago

Hmm that's odd. Do you know of any convenient online TypeScript Playground sort of thing that allows package import? May be a TS version discrepancy.

selfrefactor commented 3 years ago

No, I don't know such playground. I'll close the ticket as I cannot reproduce the issue, but feel free to comment further.