Convert a known object to Record<string, unknown> by iterating
Object.entries. This avoids the cast that TypeScript's object
type (no index signature) otherwise forces.
Only use this when you already know value is an object — it does
not perform a type guard.
Convert a known
objecttoRecord<string, unknown>by iteratingObject.entries. This avoids the cast that TypeScript'sobjecttype (no index signature) otherwise forces.Only use this when you already know
valueis anobject— it does not perform a type guard.