Deriving types from other types in TypeScript — unions and interfaces

Union type to interface transition
The transition from union type to interface, and back
Maintaining a lot of similar types can be a mundane task, especially if some of them must stay in sync due to some dependency on one another.

You're going to learn how to, with a little bit of type-level programming, reduce that toil by deriving types from other types.

Union types, pattern matching and exhaustiveness in today's JavaScript

Despite being a small library, there is a lot we can do with daggy
Pattern matching and union types are, in my view, one of the concepts in programming which don't get the attention they deserve. In this post, I'm going to show how they can help us write more declarative code.

Leaving implementation details for later with unsafeCrashWith in PureScript

Once we're happy with the overall design of our code, all that is left is the actual implementation
Focusing on implementation details might be a waste of time if we just want to test an idea out. In these rare cases, the unsafeCrashWith function defined in the Partial.Unsafe module comes in handy

Pattern match multiple values without a Tuple in PureScript

We can pattern match multiple values with no extra imports, natively
To pattern match multiple values in PureScript, it's very tempting to wrap them with Tuple data constructor. That's not really necessary.

"TS2307: Cannot find module" with custom modules-folder in yarn

Sometimes we may choose to change the default location of the node_modules folder when we work with yarn. Our build may start failing with TS2307 error but there is a workaround.