Debug browser code in vscode

One of the selling point of vscode is its built-in debugger. It is quite powerful but not the easiest thing to setup . Debugging Nodejs code is kind of straightforward as usually it is a standalone file or sometime an entry server file. I have a blog on debug typescript mocha and server in vscode. However…

typeof and Mapped type in Typescript

I was reading an article introducing the usage of the typeof and Mapped type which was introduced back in TS 2.1. It is quite interesting that typescript can actually make generic of generic and infer the types of properties and then use them for border extensions. For typeof it basically yields the type of permitted property names. A keyof…

My first TS custom decorator

Background Was reading some nestjs related documentation and found the custom decorator portion quite interesting. So decided to write one myself. Decorator vs Annotation Syntax-wise decorator in Typescript is quite similar to the annotation in Java where we can assign metadata information to class/field/method. However under the hood, they are quite different. One of the major…