Type Alias ExtractValue<KeyGeneric, ParentGeneric>

ExtractValue<KeyGeneric, ParentGeneric>: KeyGeneric extends keyof ParentGeneric
    ? SetRequired<ParentGeneric, KeyGeneric>[KeyGeneric]
    : KeyGeneric extends keyof Extract<ParentGeneric, Record<KeyGeneric, any>>
        ? SetRequired<Extract<ParentGeneric, Record<KeyGeneric, any>>, KeyGeneric>[KeyGeneric]
        : never

Helper type for hasProperty.

Type Parameters

  • KeyGeneric extends PropertyKey
  • ParentGeneric