Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardTypeScriptconditional-type distributionSingle-choice MCQ1 views

Why do `D` and `W` produce different results for the same `unknown` input, and what does this reveal about distribution gating?

type D<T> = T extends {} ? "obj" : "other"; type W<T> = [T] extends [{}] ? "obj" : "other"; type A = D<unknown>; type B = W<unknown>;