Conditional Type
Noun · Development
Definitions
A type-system feature that selects one resulting type or another based on a type relationship or constraint, often used in advanced generic programming. Conditional types allow library authors to express APIs whose types adapt automatically to the inputs provided by the caller.
In plain English: A type that changes based on conditions in the type system.
Example: "The utility used a conditional type so arrays produced one inferred result shape while scalar inputs produced a different one without forcing users to annotate anything manually."