Course of Advanced TypeScript: Beyond any

Isma NavarroJavier Ferrer

By Isma Navarro y Javier Ferrer Frontend y Backend

In this course, we will lay the foundations of advanced TypeScript with the aim of establishing the basic knowledge for future courses where we will delve deeper into other aspects of this development tool.

💸 First lesson available without registration 💸

What will you learn in this course?

The goal of this course is to present advanced aspects of TypeScript in order to lay the necessary foundations for presenting more advanced concepts in future courses.

After this course, you will know about generics, unknown, never, narrowing, enums, and decorators.

All through practical examples that you can apply to your projects, referencing also our repository of TypeScript examples that we will cover throughout the course and that we will expand as we develop the content.

During the course, we will see:

  1. 🚀 TypeScript is much more than JavaScript with types: Your new helper for development
    • 5 things you didn't know about TypeScript
    • ⚡ Quick review of everyday examples
    • 🥓 Interfaces vs type alias
  2. ⚒️ Reuse your code and understand complex signatures thanks to Generics
    • 👯‍♂️ Ensure restrictions of your domain and gain semantics through generics
    • 🐻 We analyze how Zustand makes use of generics
    • 📉 When we are overdoing it and should NOT use generics
  3. 👩‍🔬 Take advantage of the potential of lesser-known types: unknown and never
    • 👻 Ensure typing in your function clients with unknown
    • 🪄 The hidden potential of unknown: Forces typing of optional input arguments
    • 🌌 What the never type consists of and differences with void
  4. 🐌 Basic uses of enums: Numeric vs String vs Const vs Object as const
    • 🤔 Numeric enums: Model the level of access to allow certain actions or not
    • 🦊 String enums: Mapping of log levels, warning, and error with their behavior
    • 👐 Enum vs object as const: Differences, when to use each along with keyof and typeof
  5. 💪 Advanced enums: Gain semantics, robustness, and make your code comply with SOLID
    • 🏭 Factories: From 16 lines to 1 while complying with SOLID thanks to keyof and typeof
    • ⛑ Leave booleans behind and model the state of your application with Enums
    • 🌍 Uses of enums in real-world code (Next.js and Prisma)
  6. 💅 Extend the behavior of your methods and classes with decorators.
    • 🙋‍♀️ How to use decorators in your project?
    • 🌋 With great power comes great responsibility. Coupled code due to decorators.
    • 💉 Dependency injection with decorators and DIOD
  7. 🪡 Narrowing: Implicitly casting types
    • 🤷‍♀️ What is narrowing? Help yourself with the transpiler by understanding how it works
    • 💪 Ensure robustness when dealing with enums through exhaustiveness with narrowing and never
    • 💂‍♀️ Other forms of narrowing: type predicates, type guards, instance of
  8. 🔒 Conclusion and next steps
    • 🧪 Save tests and headaches thanks to TypeScript
    • 💡 Understand that TypeScript is a lie vs internalizing it
    • 🚵‍♀️ Can you follow this example?

Videos of the course

Related courses

See full catalogue

Pay according to your needs

lite (only monthly)

19 €
per month
  • Access to a subset of courses to lay the foundation for maintainable, scalable, and testable code
  • Company invoice
Popular

standard

24,92 €
Save 121
Annual payment of 299
per month
  • Full course catalog
  • Design and architecture challenges
  • Highlighted solutions videos for challenges
  • Receive job offers verified by Codely
  • Company invoice

premium

41,58 €
Save 89
Annual payment of 499
per month
  • All previous benefits
  • Early access to new courses
  • More benefits coming soon

We won’t increase the price while your subscription is active