typedash
Version:
modern, type-safe collection of utility functions
15 lines (14 loc) • 948 B
text/typescript
import { t as CastToString } from "./CastToString-njj4K8EX.cjs";
import { t as KeysOfUnion } from "./KeysOfUnion-D3-apcAx.cjs";
//#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-Cja93mAD.d.cts.map