UNPKG

typedash

Version:

modern, type-safe collection of utility functions

15 lines (14 loc) 945 B
import { t as CastToString } from "./CastToString-Dm1m4Kgs.js"; import { t as KeysOfUnion } from "./KeysOfUnion-CRGM1li-.js"; //#region src/functions/objectEntries/objectEntries.d.ts declare const objectEntries: ObjetEntries; /** * Returns an array of a given object's own enumerable string-keyed property [key, value] pairs, in the same order as that provided by a for...in loop. (The only important difference is that a for...in loop enumerates properties in the prototype chain as well.) * Same as `Object.entries()` but returns a typed array. * @param object An object whose enumerable own property [key, value] pairs are to be returned. * @returns An array of the given object's own enumerable string-keyed property [key, value] pairs. */ type ObjetEntries = <T extends object>(object: T) => [CastToString<KeysOfUnion<T>>, T[keyof T]][]; //#endregion export { objectEntries as t }; //# sourceMappingURL=objectEntries-BLa4gKRd.d.ts.map