Explore Library
Code QuizBeginner

Rest Parameters Type Annotation

A rest parameter is typed as a single value instead of an array.

Codetypescript
function sum(...numbers: number): number {
  return numbers.reduce((a, b) => a + b, 0);
}

What is the bug with the rest parameter?