fp-ts-playground icon indicating copy to clipboard operation
fp-ts-playground copied to clipboard

A playground to test a super article about FP-TS

Test FP-TS

A playground to test gcanti's super article.

Use case

Sentinels

Use case: an API that may fail and returns a special value of the codomain

undefined and null

Use case: an API that may fail and returns undefined (or null)

Exceptions

Use case: an API that may throw

Random values

Use case: an API that returns a non deterministic value

Synchronous side effects

Use case: an API that reads and/or writes to a global state

Use case: an API that reads and/or writes to a global state and may throw

Asynchronous side effects

Use case: an API that performs an asynchronous computation

  • Code
  • ⚠️ I don't know how to test this, help me please :)

Use case: an API that performs an asynchronous computation and may reject