I think the example type is useful for unvalidated input data e.g. from an API call. Or an update function for a DB abstraction.
Internally in the backend, you’d still use the type you just posited.
Internally in the backend, you’d still use the type you just posited.
On review of documentation, I was actually pretty off base in grandparent comment. The real use case for Record appears to be when you need a map type whose keys are both explicitly enumerated and defined elsewhere, ie in a union, enum, or otherwise unrelated object type. Rather than duplicating the keys, you can use Record<someUnion, V> or Record<keyof typeof someEnum, V> and only have to make one change to update both.
For the "arbitrary keys, known value types" case I mentioned earlier, an object type with an index signature works fine and may be more legible.
If I understand you correctly, that's exactly what a Record is underneath