Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardTypeScriptvariadic tuple typesSingle-choice MCQ

Given the variadic tuple destructuring `T extends [infer F, ...infer M, infer L] ? M : never`, what does the checker infer for `M` when `T` is `[1, 2, 3, 4]`?

type Mid<T extends readonly unknown[]> = T extends [infer F, ...infer M, infer L] ? M : never; type R = Mid<[1, 2, 3, 4]>;