RSS feed iconGitHub logo

Articles about TypeScript

TypeScript is a statically-typed superset of JavaScript. It is my go-to choice when writing any code that would otherwise be written in JavaScript. It is also the language that I am most profficient in.

Type-safe nullability without strictNullChecks

2023-05-105 minutes readfp-ts, TypeScript

Lack of strictNullChecks makes it hard to express nullability of values. fp-ts's Option comes to the type-safe rescue.

Read more

Representing wizard state in TypeScript

2022-09-0910 minutes readTypeScript

My solution to describing the state of a multi-step wizard in TypeScript.

Read more

Options based on generic parameters

2022-07-035 minutes readTypeScript

Two approaches in TypeScript to changing the type of an options parameter based on a generic function parameter.

Read more

Collecting multiple errors in fp-ts

2022-07-0214 minutes readfp-ts, TypeScript

The fp-ts library puts errors to the forefront and helps write type-safe code that correctly reports errors. Collecting errors from multiple operations can sometimes lead to boilerplate code. Let's see if there is a way to make that code shorter.

Read more