• Stars
    star
    101
  • Rank 338,166 (Top 7 %)
  • Language
    TypeScript
  • License
    Apache License 2.0
  • Created almost 6 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An effect/IO datatype in typescript

waveguide

npm version npm version next CircleCI Join the chat at https://gitter.im/waveguide-core/community

waveguide has been superseded by mikearnaldi/matechs-effect. This package is a based off a fork of waveguide, is used in production, and contains useful additional modules like a request client.

Waveguide is a set of modules provided data types for describing effects in Typescript in the fp-ts ecosystem inspired by scala projects such as ZIO and cats-effect. Waveguide allows you to communicate with the real world in a referentially transparent manner. For a quick overview of waveguide in action see the tutorial A companion streaming library is being incubated in waveguide-streams and will eventually become part of the core

IO is:

  • Lazy. Work is not done until explicitly asked for and interruption can be used to stop work that is no longer needed.
  • Efficient. Asynchronous boundaries only occur where necessary. The run loop will execute as much work as it can before suspending.
  • Interoperable. There are a functions to adapt Promises as well as the fp-ts effect types.
  • Resource safe. Exposes a number of primitives for working with resources and guaranteeing cleanup.
  • Concurrent. Exposes a logical fiber model with support for joins and interrupts. Write your code as a sequence of effects and communicate with other fibers rather than trying to juggle the state of all concurrent processes at once.

For more information see the docs or the tutorial.

If you have questions don't hesitate to ask them in the gitter.