/** * Infer the object type from an array of entries. This is the opposite of `Object.entries`. * * @template T The type of the entries. * @example FromEntries<[['a', 1], ['b', 2]]> // { a: 1, b: 2 } */ type FromEntries> = { [K in T[number][0]]: Extract[1]; }; export type { FromEntries };