Type Alias $ResolveBranch<T, $O, $B, $D>
$ResolveBranch<T, $O, $B, $D>: [unknown, $D] extends [$D, unknown] ? $B extends [infer B] ? _Last<T, $O, B> : $B extends [infer B, ...(infer Bs extends ($Branch<any> | unknown)[])] ? $ResolveBranch._<$ResolveBranch<T, $O, Bs>, $O, B> : never : _Override<$D, $O, $B> Type Parameters
- T
- $O extends Record<string, any>
- $B extends ($Branch<any> | unknown)[]
- $D = unknown
🧰 type util
Resolve option value based on list of branches. It returns the first branch value that is specified in the option, otherwise will return the default value.
Since this is an type utility, it does not perform extensive validations. Please check the description of each input below for information.