import { objectFromEntries } from "https://dotland.deno.dev/x/scaffold@0.3.0/src/deps/npm.ts";
A strongly-typed version of Object.fromEntries()
.
This is useful since Object.fromEntries()
always returns {[key: string]: T}
. This function returns a strongly-typed object from the given array of entries.
Type Parameters
Entries extends ReadonlyArray<readonly [Key, unknown]>
Parameters
value: Entries