Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Another option that's not quite as good as `a + b + c` but that is possible with TypeScript is a fluent API:

  const sum = a.add(b).add(c);


Indeed. "Object-oriented" fluent notation is basically equivalent to infix notation.

https://mlajtos.mu/posts/new-kind-of-paper-2


Yes that syntax works right now.


or add(a,b,c)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: