Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
nesarkvechnep
on Dec 26, 2022
|
parent
|
context
|
favorite
| on:
All I want for Christmas is these seven TypeScript...
The pipe wish can be accomplished with a class. Not the most ergonomic but works well. You just need to explicitly cast `return <?, ?>this`.
choward
on Dec 26, 2022
[–]
That means all the functions you are piping have to have the same return type (i.e return an instance of your class). Piping is more generic.
Consider applying for YC's Summer 2026 batch! Applications are open till May 4
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: