Category: Programming TypeScript
-
Promise in TypeScript Implementation
In this article I will show you how to implement a promise in TypeScript. My implementation uses the monad interface I showed in the last article. I will implement the most common method of the promise class, the then pattern. What is a Promise? The promise method in TypeScript allows you to work with asynchronous…
-
Monads, Map and Flatmap in TypeScript
In this article I show how to start with functional programming in TypeScript. At the end of this article, you should know how to do a basic implemention of map and flatMap in Typescript. Functional programming is not common in TS. Normally, you would use languages like Haskell and Scala to program functionally. However, TypeScript…