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

For the signature `function f<const T>(x: T): T`, when does the `const` modifier's narrowing actually NOT apply to the inferred `T`?

declare function f<const T>(x: T): T; const arr: number[] = [1, 2, 3]; const a = f(arr); const b = f([1, 2, 3]);