API reference › @evolu/common › Object › objectToEntries
function objectToEntries<T>(
record: T,
): readonly [Extract<keyof T, string>, T[Extract<keyof T, string>]][];
Defined in: packages/common/src/Object.ts:87
Like Object.entries but preserves branded keys.
Example
type UserId = string & { readonly __brand: "UserId" };
const users = createRecord<UserId, string>();
const entries = objectToEntries(users); // [UserId, string][]