@types/object.fromentries
TypeScript icon, indicating that this package has built-in type declarations

2.0.4 • Public • Published

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.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/object.fromentries

Weekly Downloads

24,630

Version

2.0.4

License

MIT

Unpacked Size

3.92 kB

Total Files

5

Last publish

Collaborators

  • types