Type Alias $ResolveOptions<V>

$ResolveOptions<V>: V extends [infer T]
    ? T
    : V extends [infer T, ...(infer U)]
        ? [T, unknown] extends [unknown, T]
            ? $ResolveOptions<U>
            : T
        : $InferError<"cannot [infer T, ...infer U] from", V>

🧰 type util

Resolve options to the first non unknown value.

The Values are assumed to be a tuple with at least one value. These checks are not performed for performance considerations.

Type Parameters

  • V extends unknown[]