The return value is a dictionary, not an array.
Also, the argument can be better typed as Array<[string, T]> to reflect the expected pairs.
The inverse method (_.toPairs) is currently not wrong but could be typed more strictly with the return Array<[string, T]>. I left this out but I can add it to this PR if you want.
_.fromPairs documentation
The return value is a dictionary, not an array. Also, the argument can be better typed as
Array<[string, T]>
to reflect the expected pairs.The inverse method (_.toPairs) is currently not wrong but could be typed more strictly with the return
Array<[string, T]>
. I left this out but I can add it to this PR if you want.