import { Flat } from "atom.io/foundations/type-utils"; //#region src/foundations/entries/index.d.ts type Count = [...A, any][`length`] extends N ? A[`length`] : A[`length`] | Count; /** Tuples of `[key, value]` pairs, as returned from `Object.entries` */ type Entries = [K, V][]; /** The collective or "union" type of the keys in a set of entries */ type KeyOfEntries = E extends [infer K, any][] ? K : never; /** The type of the value of entry `K` in a set of entries `E` */ type ValueOfEntry> = { [P in Count]: E[P] extends [K, infer V] ? V : never; }[Count]; /** The type of a set of entries `E` in object form */ type FromEntries = Flat<{ [K in KeyOfEntries]: ValueOfEntry; }>; /** Typed form of `Object.fromEntries` */ declare function fromEntries(entries: E): FromEntries; /** The type of an object T in {@link Entries} form */ type ToEntries = Entries; /** Typed form of `Object.entries` */ declare function toEntries(obj: T): ToEntries; //#endregion export { Entries, FromEntries, KeyOfEntries, ToEntries, ValueOfEntry, fromEntries, toEntries }; //# sourceMappingURL=index.d.ts.map