Functional Programming in TypeScript. From Ideas to Practice
300 pages
English
PDF
4.5

Functional Programming in TypeScript. From Ideas to Practice

Functional Programming in TypeScript. From Ideas to Practice

Author:

Year:

Summary:

The book "Functional Programming in TypeScript" is a practical guide that will help you master the paradigm of functional programming (FP) using TypeScript's strict typing. You will learn to write more predictable, testable, and maintainable code by eliminating side effects and state mutations.



What this book is about

The book systematically reveals the key concepts of FP:

  • Pure functions and immutability — why abandoning mutable state simplifies debugging and testing.
  • Function composition — how to build complex logic from simple building blocks.
  • Currying and partial application — techniques that make code flexible and reusable.
  • Functors and monads — working with contexts (Maybe, Either, IO) without exceptions and null.
  • Higher-kinded types — using TypeScript's strict type system for FP code safety.
  • Lazy evaluation and infinite structures — performance optimization through deferred operations.


Who this book is for

  • Junior and Middle developers familiar with TypeScript (or JavaScript) who want to transition to a functional style.
  • Developers writing in React/Vue/Angular who are tired of spontaneous state mutations.
  • Programmers interested in Haskell, Scala, or Elixir but working within the TypeScript ecosystem.


What you will learn

  • How to write code without side effects while solving real-world problems (data processing, working with APIs, complex business logic).
  • How to use monads for safe error handling and null values.
  • How to build data transformation pipelines using composition.
  • How to type FP constructs (type guards, conditional types, mapped types) for maximum safety.
  • How to refactor imperative code into functional code without losing performance.


The book contains numerous code examples, exercises, and real-world scenarios. After reading it, you will be able to apply the functional approach in everyday development and gain tools for creating reliable applications with a minimum number of bugs.



Perfect for those who want to go beyond OOP and master modern programming practices in TypeScript.

Recommendations