prefect-ui-library
prefect-ui-library copied to clipboard
Unable to create maps where the source is an array
Issue
Since mapper.map automatically maps over arrays we're unable to create maps that take the entire array as a source. Which means we cannot write mappers to convert an array to an object which is quite useful.
Proposal
Separate out array mapping into a separate method similar to mapEntries
. Possibly mapArray
. And update map
to only work on single values.
Breaking Change
Doing this would be a breaking change since many of our mappers rely on mapper.map
accepting an array and mapping over each value individually.
Unknowns
Will the types work correctly?