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

Given the variadic tuple signature, what is the inferred return type of the call, and why?

function tail<T extends readonly unknown[]>(arr: readonly [unknown, ...T]): T { const [, ...rest] = arr; return rest as T; } const r = tail([1, 'a', true, null] as const);