Skip to content

Commit

Permalink
use same Types as TypeScript does for Object.fromEntries
Browse files Browse the repository at this point in the history
  • Loading branch information
gr2m authored Oct 22, 2020
1 parent 7df43c7 commit c1c4a48
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
declare function fromEntries<Key extends string | number | Symbol, Value>(iterable: Array<[Key, Value]>): {
[key: Key]: Value;
};
declare function fromEntries<T = any>(entries: Iterable<readonly [PropertyKey, T]>): { [k: string]: T };

export = fromEntries;

0 comments on commit c1c4a48

Please sign in to comment.