Problem Statement
Conditional type form:
Explanation
A conditional type reads: if T is assignable to U, produce X, otherwise produce Y. It’s purely a type-level if-else.
Code Solution
SolutionRead Only
type IsString<T> = T extends string ? true : false; type A = IsString<'hi'>; // true type B = IsString<123>; // false
