User-defined Type Guards in Typescript
Type Guards are one of the key features of type-safe code. The TypeScript Handbook describes type guards as: Some expression that performs…
How to remove unused imports in VSCode
Unused and unorganized imports are a headache for any project. It uses unnecessary space, memory, and increases LOC. Here´s a shortcut to fix…
How to clear your cache in npm
If you ever get weird errors in npm like “Please run npm cache clean” you may need to clean or refresh your…
How to debug Angular In VS Code
Angular is usually edited in Visual Studio Code editor. Their powers combined let you not only develop Angular app code but also…
Make all properties optional in TypeScript
Let´s use the Partial utility type to make all of the properties in a type optional, interface Employee { id: number; name:…
How to Break Out of a JavaScript forEach() Loop
JavaScript´s forEach() function executes a function on every element in an array. However, since forEach() is a function rather than a loop, using the break statement is…
Angular: Difference between pure and impure pipe
When writing a custom pipe in Angular you can specify whether you define a pure or an impure pipe: @Pipe({…
How to Use ngTemplateOutlet in Angular
ngTemplateOutlet is a structural directive. It instantiates a template dynamically using a template reference and context object as parameters. We use…
JavaScript Modules vs. NgModules
Modules help organize our code and use it in an efficient way JavaScript modules and NgModules can help us modularize…
How To install & update Node.js on Debian 10
Node.js is a JavaScript runtime for server-side programming. It allows developers to create scalable backend functionality using JavaScript, a language many…








