Other techs

PowerShell Install msi silently

PowerShell. I sometimes need to use it. Whenever I use it, I have to google it to know how to do it. This time, I ne...

Understanding how to use Symbol.iterator in JavaScript/TypeScript

Symbol.iterator can be used to initialize the iterator. If you need to go back to the first element after the iterator goes forward, it's the right place to use it. This post shows the example.

TypeScript keyof typeof for type generation

keyof extracts the keys of an interface or type and can be used to generate a new type. typeof generates a type from an object. The combination of keyof and typeof can generates a type from an object.
Sponsored links

TypeScript Make the function parameter more maintainable by using interface

Many programming languages support interface keyword. TypeScript also supports the feature. This is one of the importan...

TypeScript Utility types defined with infer keyword

infer keyword is one of the difficult features that TypeScript offers. Some utility types use infer keyword, so let's l...

TypeScript How to set a default value with Interface

This page shows 3 ways to set default values to an interface. Using Spread Operator is an easy way. You can also define the default values in a function. An advanced way is to create a class for it.

node-serialport throws “File not found” error for a certain device when using USB-COM interface

I needed to use node-serialport to use a scanner for my project. I have two scanners. One of them works fine but anothe...

Implement IoT State Machine Transition By State Pattern In TypeScript

In my project, my team needed to implement State machine. One of the developers implemented it by using many if-else bu...

A good way to write our own Node-RED node for the testability

I have used Node-RED for more than 3 years for my working project. I came up with a good idea to write our own node for...

Object Type Check By User Defined Type Guard with Record Type

I wrote the following article before. When we want to access a property of an object, we must somehow tell the...
Copied title and URL