I’ve been working with TypeScript for more than three years. I’ve learned a lot during this journey, but I still have the nice…
Record is one of the TypeScript utility types and has been available out of the box since version 2.1.
I have to admit that I was a little confused when I read the official definition for the first time:
In this article, I will talk about how to use the Decorator pattern to consume REST API in Angular.
Consuming REST API data using
HttpClient in Angular is the most common way of connecting an Angular App to the back end services.
HttpClient Service handles the JSON data parsing under…
What I love about TypeScript is its Type system. It is practical and feature rich. Applying the types in the right use cases can make our code cleaner and easier to maintain.
The purpose of this article is to share an example of code refactoring with TypeScript discriminated union type…
Angular state management is the core of any Angular App, but there is no one-size-fits-all solution. Although Ngrx is the most popular Angular state management framework, its excessive boilerplate codes make it overkill for many small to middle-size apps.
I wrote an article on how to resolve SSL certificate error a while ago. The article briefly discussed the TLS handshake. There are a lot more details left uncovered.
To my surprise, the article become the most viewed one within all my Medium posts. I guess readers are interested in…
I found out that I repeatedly use some TypeScript code patterns in daily work. Those code patterns aren’t heavy or complex, and they also don’t require a lot of boiler-plate code. They’re just simple and practical solutions to resolve a few common problems.
In the next few sections, I’ll share…
There are many benefits for a developer to write blog posts. Writing can build up your portfolio, deepen your knowledge and generate a small passive income. It can even be a bonus point when you apply for a new job.
However, the skills required for writing are different from coding…
If…else exists in all programming languages. They’re not bad practice if used properly. It’s a simple, easy-to-understand, and flexible logic control structure.
But in reality, it’s often used excessively. They can be bad in the following cases:
Builder Pattern is one of GoF design pattern designed to construct objects which typically requires a long list of arguments. It allows you to create multiple different but also similar objects with the Builder class.