TypeScript Best Practices
This course will teach you best practices for writing effective, maintainable, and performant code for all of your TypeScript projects.
What you'll learn
Best practices ensure your code is clean, readable, and maintainable. This makes it easier for you and others to understand and modify the code in the future. In this course, TypeScript Best Practices, you’ll learn many best practices for writing clean, readable, maintainable, and performant TypeScript. First, you’ll explore some project-level best practices for project configuration, structure, and tooling. Next, you’ll discover language-specific best practices for writing TypeScript, such as features of the language to avoid or favor, before progressing through intermediate and advanced topics like using conditional types and decorators. Finally, you’ll learn some best practices for writing asynchronous code, security, performance, and testing. When you’re finished with this course, you’ll have the skills and knowledge of TypeScript best practices needed to create effective, maintainable applications that adhere to modern industry standards.
Table of contents
- Avoid the `any` Type 5m
- Handle `null` & `undefined` Safely 5m
- Avoid Excessive Annotation 1m
- Utilize Intersection Types 3m
- Use Enums 2m
- Using Tuples for Fixed-length Arrays 3m
- Use ReadOnly and ReadOnlyArray Types 3m
- Use the Polymorphic This 2m
- Favour Type-guards over Type Assertion 6m
- Make Switch Statements Exhaustive 3m
- Use Utility Types Where Applicable 4m
- Use Generics 2m
- Use Conditional Types 6m
- Use Decorators 5m