Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

ObjectEntries

A TypeScript utility type that represents the entries of an object as a union of tuple types. Each tuple contains a key-value pair where the key and value types are precisely typed according to the input object type.

@example
type MyObject = { a: 1; b: 'B' }
type MyEntries = ObjectEntries<MyObject>
//   ^ ["a", 1] | ["b", "B"]
type ObjectEntries<T extends Record<string, any>> = [K in keyof T]: [K, T[K]][keyof T];

§Type Parameters

§
T extends Record<string, any>
[src]

§Type

§
[K in keyof T]: [K, T[K]][keyof T]
[src]