Conditional Types
T extends U ? X : Y selects a type by an assignability test, giving the type system branching logic; nesting them builds type-level decision trees. Evaluation is deferred while T contains unresolved type parameters, which is why conditional types compose inside generics.
This Concept is waiting for its first lesson!
T extends U ? X : Y selects a type by an assignability test, giving the type system branching logic; nesting them builds type-level decision trees. Evaluation is deferred while T contains unresolved type parameters, which is why conditional types compose inside generics.
Are you a teacher? Sign in to start contributing.
Sign In