takes an array of 2-tuples (entries) of the form [key: string, value: any], and returns a union of the first element of each of the tuples (keys). it practically functions like the elements of Object.keys.
[key: string, value: any]
Object.keys
type MyKeys = EntriesToKeys<[["name", "john"], ["age", 30], ["title", string]]>// type MyKeys === ("name" | "age" | "title") Copy
type MyKeys = EntriesToKeys<[["name", "john"], ["age", 30], ["title", string]]>// type MyKeys === ("name" | "age" | "title")
Generated using TypeDoc
takes an array of 2-tuples (entries) of the form
[key: string, value: any]
, and returns a union of the first element of each of the tuples (keys). it practically functions like the elements ofObject.keys
.