PairValue<T>: T extends Readonly<[string | number, infer TValue]> ? TValue : T extends List<infer TValue> ? TValue : never

if T is an inferrable pair, the value type for the pair if T is a list, assume that it contains pairs of some type, so any if T isn't a list, there's no way that it can provide pairs, so never

Type Parameters

  • T