Learn fp-ts
  • Learn fp-ts
  • Introduction
  • Data Types
  • Code conventions
  • Option
    • Type guards
    • Comparison with vanilla typescript
  • Either
    • ParseJson
  • TaskEither
    • TaskEither and io-ts
Powered by GitBook
On this page
  • Data Types
  • Commonly Used Data Types

Was this helpful?

Data Types

The various data types implemented

Data Types

The various Data Types are at the core of the library, you can use them to solve specific problems. The neat thing is that every Data Type shares the same interfaces so using a new Data Types uses the same familiar interfaces.

Commonly Used Data Types

This are the most commonly used Data Types

  • Option – is used to explicitly express that a value can be absent.

  • Either – represents a value of one of two possible types: Left<A> and Right<B>.

  • NonEmptyArray – an array that is guaranteed to contain at least one element.

  • Task – represents an asynchronous computation that yields a value and never fails.

PreviousIntroductionNextCode conventions

Last updated 5 years ago

Was this helpful?