Tuple<T>: [T, ...T[]]

This utility type can be used in place of T[] where you want TS to infer things as tuples as opposed to array. Also note that T[] could be empty, wheres Tuple<T> will contain at least one T.

Type Parameters

  • T = unknown

Generated using TypeDoc