DEV Community

Discussion on: Simple Immutable Data w/ Spectacles 👓

Collapse
 
patroza profile image
Patrick Roza • Edited

You may want to look at tsplus, so you can combine the best of both worlds:

  • Fluent for ergonomics, discoverability
  • Compiled down to module imports for tree shaking

also

  • Can inject globals at compile time, so you don't need to import your most used modules, variables, functions etc
  • Operators, and more.

install with github.com/ts-plus/installer
sample impl at github.com/ts-plus/stdlib/blob/mai...
usage example: github.com/ts-plus/stdlib/blob/mai...

You can basically make your library tsplus "compatible" or let's say - easily consumable, without taking a hard dependency. Because it's basically JSDoc annotations.

Oh there's a post by the man himself now :) dev.to/matechs/the-case-for-ts-18b3

(seeing your scala/fp interest, you may also follow down the rabbit-hole into Effect-TS, where the next branch will be fully ts-plus powered ;-)