What does the ‘infer’ keyword enable inside a conditional type?

TypeScript Associate Hard

TypeScript Associate — Hard

What does the ‘infer’ keyword enable inside a conditional type?

Key points

  • 'infer' keyword extracts types from conditional types
  • Enables dynamic type inference within conditional types
  • Facilitates creating flexible and reusable type definitions

Ready to go further?

Related questions