Complete the code to declare a tuple with a rest element that collects numbers.
type Numbers = [string, ...[1][]];The rest element ...number[] collects all remaining elements as numbers in the tuple.
Complete the code to define a tuple type where the first element is a boolean and the rest are strings.
type BoolStrings = [[1], ...string[]];The first element is a boolean, followed by any number of strings collected by the rest element.
Fix the error in the tuple type that tries to use multiple rest elements.
type InvalidTuple = [number, ...string[]];
TypeScript tuples can only have one rest element, and it must be last. The last part should be removed or corrected.
Fill both blanks to create a tuple type with a string first element and a rest element collecting booleans.
type TupleWithRest = [[1], ...[2][]];
The tuple starts with a string, followed by any number of booleans collected by the rest element.
Fill all three blanks to define a tuple type with a number first element, a boolean second element, and a rest element collecting strings.
type ComplexTuple = [[1], [3], ...[2][]];
The tuple starts with a number, followed by a boolean, then any number of strings collected by the rest element.