Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardTypeScriptNoInfer and const type paramsSingle-choice MCQ

Given a `const` type parameter with no constraint, how deeply does `const` affect the inferred type of a nested literal argument?

declare function f<const T>(x: T): T; const r = f({ a: [1, 2], b: { c: "x" } });