Gets the type of the first element of a readonly tuple T.
If the tuple is empty, it returns the default type D (defaults to never).
For a general (non-tuple) array, it returns the element type.
Type Parameters
Textendsreadonlyunknown[]
The readonly tuple type.
D = never
The default type to return if T is empty. Defaults to never.
Returns
The type of the first element, or D if T is empty.
Gets the type of the first element of a readonly tuple
T. If the tuple is empty, it returns the default typeD(defaults tonever). For a general (non-tuple) array, it returns the element type.