Improve your TypeScript workflow with Code Snippets
Learn how to improve your TypeScript workflow by using code snippets. This article provides a code example for logging a JSON response into a file using Node.js and TypeScript.
Learn how to improve your TypeScript workflow by using code snippets. This article provides a code example for logging a JSON response into a file using Node.js and TypeScript.
This article explains how to filter arrays in TypeScript while maintaining correct types. It demonstrates how to create a type guard to ensure that the filtered array only contains the desired type. It also discusses the downsides of type guards and compares them to assertion functions.
ECMAScript Modules (ESM) enable the importing and exporting of code and are supported in modern web browsers, Deno, Bun, and Node.js. It's recommended to use ESM as major frameworks are already embracing it. Let this tutorial guide you through the process.
NestJS can serve static content when running on an Express server. This is useful when you want to host a React frontend website through your Nest service.
I recently wrote a small TypeScript script to generate a Markdown file with a sluggified filename. Since we're now in the era of modern ECMAScript Modules (ESM), I wanted to use this new module system in my TypeScript code. Here's how I did it.