A Deep Dive Into Advanced Typescript: A Live Coding Expedition by Christian Wörz

Join Christian Wörz on a live coding expedition to explore advanced TypeScript concepts, including recursive types, inferred types, mapped types, conditional types, and more.

Key takeaways
  • Use recursion to create a type that takes an input type and returns a nested type.
  • Use the infer keyword to infer the type of a specific position in a type.
  • Create a mapped type that transforms the properties of an object.
  • Use conditional types to create a type that depends on the value of a type.
  • Use the brand type to create a type that is equivalent to a string, but with additional properties.
  • Use the never type to indicate that a type can never be assigned to another type.
  • Use the any type to indicate that a type can be assigned to any other type.
  • Use the as any keyword to tell TypeScript to treat a value as if it were of type any.
  • Use the infer keyword with a generic type to infer the type of a specific position in a type.
  • Use recursion to create a type that takes an input type and returns a nested type.
  • Create a type that represents a tuple with a variable number of elements.
  • Use the readonly keyword to make a property read-only.
  • Use the never type to indicate that a type can never be assigned to another type.
  • Use the infer keyword to infer the type of a specific position in a type.
  • Use recursion to create a type that takes an input type and returns a nested type.