Sponsored links
JavaScript/TypeScript

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.
JavaScript/TypeScript

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 important...
JavaScript/TypeScript

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 le...
JavaScript/TypeScript

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.
JavaScript/TypeScript

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 another...
JavaScript/TypeScript

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 but...
JavaScript/TypeScript

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 ...
JavaScript/TypeScript

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 compiler i...
JavaScript/TypeScript

TypeScript input validation by Method Decorators

While I read a book on API Design Patterns, I found decorators were used in the examples.It looks like this.@get("resour...
Recommendations

Thumb orthosis supports Tendonitis/Arthritis to relieve the pain

I have tendonitis maybe in my both thumb. A programmer could have this problem because we use our fingers a lot.I've had...
Sponsored links