type Foo = [first: number, second?: string, ...rest: any[]];