npm.io
2.0.4 • Published 2 years ago

@types/object.fromentries

Licence
MIT
Version
2.0.4
Deps
0
Size
4 kB
Vulns
0
Weekly
0
Stars
51.4K

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 0939 GMT
  • Dependencies: none

Credits

These definitions were written by Andres Riofrio.