Closed asktree closed 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
})
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.
No, I don't know such playground. I'll close the ticket as I cannot reproduce the issue, but feel free to comment further.
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 typenumber
Actual:example
has typeunknown
Other libraries do not require manual typing in the data-first case because it is not needed. See
fp-ts
'spipe
(which has the same API aspiped
, dont let the name confuse you)