A rest parameter in a JavaScript function must be the last parameter of the list:

// Does not work
function example(...arg, value) {}

// Works
function example(value, ...args) {}

However, you can use the rest syntax for an array type in TypeScript at any position.

// Expect a list of strings and one number as last parameter
function example(...args: [...string[], number]) {}

// It can also be in the middle of an array
type Example = [boolean, ...string[], number];