Installation
npm install --save @types/object.fromentries
Summary
This package contains type definitions for object.fromentries (https://github.com/es-shims/Object.fromEntries#readme).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/object.fromentries.
index.d.ts
// Adapted from node_modules/typescript/lib/lib.es2019.object.d.ts
/**
* Returns an object created by key-value entries for properties and methods
* @param entries An iterable object that contains key-value entries for properties and methods.
*/
declare function fromEntries<T = any>(
entries: Iterable<readonly [PropertyKey, T]>,
): {
[k in PropertyKey]: T;
};
/**
* Returns an object created by key-value entries for properties and methods
* @param entries An iterable object that contains key-value entries for properties and methods.
*/
declare function fromEntries(entries: Iterable<readonly any[]>): any;
export = fromEntries;
Additional Details
- Last updated: Tue, 07 Nov 2023 09:09:39 GMT
- Dependencies: none
Credits
These definitions were written by Andres Riofrio.