Skip to content

Latest commit

 

History

History
24 lines (19 loc) · 829 Bytes

File metadata and controls

24 lines (19 loc) · 829 Bytes

Home > types-kit > InternalReplacePickValue

InternalReplacePickValue type

Signature:

type InternalReplacePickValue<
  Key,
  Current,
  KeysArr extends readonly unknown[],
  ValuesArr extends readonly unknown[],
> = Key extends OtherToString<KeysArr[0]>
  ? ValuesArr[0]
  : KeysArr extends [KeysArr[0], ...infer RestKeys]
  ? ValuesArr extends [ValuesArr[0], ...infer RestValues]
    ? InternalReplacePickValue<Key, Current, RestKeys, RestValues>
    : Current
  : Current

References: OtherToString, InternalReplacePickValue