TypeScript in NodeJS

It doesn't take much to set up TypeScript in NodeJS. TypeScript's type safety makes it much more enjoyable to write than plain JavaScript.

If you're new to TypeScript, check out the playground where you can see a bunch of examples of what TypeScript looks like compared to JavaScript.

When importing NPM packages, you can almost always find the typings by installing @types/my-package-name. If that doesn't work, do a web search and you'll most likely find a blog post or StackOverflow answer that tells you how to use the package with TypeScript.

View code on GitHub

Comments

Popular posts from this blog

C# Record Serialization

Add timestamp to photo using ImageMagick

Read/write large blob to SQL Server from C#