head ()
head
<
T
,
R
>
(
x
)
:
R
Returns the first element of an array or fist character of a string.
Type Parameters
T
R
=
T
extends
readonly
A
[]
?
OptSafe
<
A
>
:
Opt
<
string
>
Parameters
x
:
EmptyValue
|
T
Returns
R
Back to index
Returns the first element of an array or fist character of a string.