— In TypeScript, you can use the `never` type to check that all cases were handled in a switch/case block.
— Learn how to exclude and include properties from objects or arrays of objects in TypeScript as well as JavaScript.
— Utility types are included with TypeScript to help with common typing tasks. In this article, we will see how utility types can be used to manipulate unions, objects, strings, and other types.
— In this guide, we'll examine when you might want to use a union, enum, or object and the relative strengths and weaknesses of each feature, and see why unions and objects should be the backbone of most TypeScript projects.
— Union types are a powerful feature of TypeScript to ergonomically model a finite number of mutually exclusive cases and ensure that every case is handled safely.
— Type guards are conditional checks that allow types to be narrowed from general types to more specific ones. With type guards, we do run-time type checking and ensure that code is safe.
— Context is a simple, but powerful feature that can be used in any React project. Using Context we can solve issues with prop drilling, and then by adding TypeScript, we can dramatically improve safety when using a context.
— Deleting dead code is a worthwhile effort that reduces the amount of that code that has to be downloaded, compiled, and maintained. Using automated tools, we can simplify the process of identifying dead code and removing it.
— The Modify type can be used to replace properties in types, which can be useful when working with libraries that have non-generic types.