Skip to content

Type Alias: FirstNonErrorTuple<T> ​

ts
type FirstNonErrorTuple<T> = T[0] extends Error ? T[1] : T[0];

Extracts the type of the first non-error element of an array.

Type Parameters ​

Type Parameter
T extends unknown[]