TypeScript

TypeScript

Exploring template literal types in TypeScript

Follow me along as I explore two new features of TypeScript 4.1, template literal types and recursive conditional types. All this to create a typed version of a function that reads data from an API.

Read
Web Components

Handling Observables in a LitElement component

In this post, we are going to explore how to handle Observables inside a LitElement component. What options we have for this and how I've created a generic solution. It will handle subscribing to a stream, with some extra features and built in functionality.

Read
Programming

Typed fake REST APIs

See how to create a fake REST API using JSON Server. TypeScript will protect us against any model changes and faker.js will help with generating random data. Use it for local development, testing or any other related activities.

Read
TypeScript

Barrel files: to use or not to use?

How to use barrel files in our projects. Should you use them? If yes, how to organize code around them and where to place these files. Read on to find out more.

Read
TypeScript

Use absolute paths for module imports

Handling imports is a bit more trickier to manage due to paths and constant refactoring that one will do inside a more complex application.

Read
NgRx

Testing NgRx effects

My approach in testing NgRx effects. Some of the things that worked and some that did not.

Read