Skip to content

TupleHead

Category
-
Alias
FirstAsTuple

Extracting the first element of a tuple as a tuple type.

Usage

ts
import type { 
TupleHead
} from '@utype/shared'
type
Prop
= [
a
: string,
b
: number,
c
: boolean]
// Expect: [a: string] type
TupleHeadProp
=
TupleHead
<
Prop
>