Check if a tuple includes a specific type.
Tuple type
Type to check for
Recursively checks each element of the tuple to see if it matches the specified type.
type HasString = TupleHas< [ number, string, boolean ], string >; // truetype HasDate = TupleHas< [ number, string, boolean ], Date >; // false Copy
type HasString = TupleHas< [ number, string, boolean ], string >; // truetype HasDate = TupleHas< [ number, string, boolean ], Date >; // false
Check if a tuple includes a specific type.