An assertion function is a runtime check that identifies the type of unknown input. TypeScript's compiler assumes the input is of the type claimed by the assertion function's signature. Assertion functions are useful for uncertain values, like user input, and generate runtime checks. They can raise errors if the input doesn't meet criteria.
TypeScript 2.1 introduced mapped types, which allow you to create new types based on the properties of an existing type. For example, you can create a mapped type that has the same keys as an existing type, but with optional values.
TypeScript 3.4 introduced const assertions, which allow you to claim a value as immutable. This is useful when working with arrays, as it prevents new values from being added to an existing array.
You can extend your Express.js server by writing custom middleware functions. These functions intercept every request and allow you to add custom functionality or filters. You can also pass the request to other middleware functions.
You can use Chrome's DevTools to debug Node.js applications. To do this, you need to set your Node.js app as a remote target using the `--inspect` flag when starting the `node` process. Once your app is registered, you can open the DevTools for Node in Google Chrome.