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

A `const` type parameter is constrained to `readonly unknown[]`. After the call below, can you call `t.push(3)`?

declare function h<const T extends readonly unknown[]>(x: T): T; const t = h([1, 2]); t.push(3);