79286594

Date: 2024-12-17 03:14:59
Score: 0.5
Natty:
Report link

I was confused by the overload definition. If the input is Record type, the key of the output is always string.

From source:

  /*
   * NOTE: when the `input` value is a simple Record<K, V> object, the keys are extracted with
   * Object.keys(). This means that even if the `input` type is Record<number, V> the keys are
   * compared/returned as `string`s.
   */
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: imcoding