-
-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[core] How can I use mapWith
with arrays?
#253
Comments
I've managed to do this kind of mapping with |
micalevisk
changed the title
[core] Can I use
[core] How can I use Feb 2, 2021
mapWith
with arrays?mapWith
with arrays?
@micalevisk Thanks for reporting. Please try 2.0.1 out |
@nartc it works now! ty |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey!
I'm trying to use
mapWith
when thesource
anddestination
values are arrays. Is there a way to do this?What I've done:
I see that is a limitation due to these lines:
mapper/packages/core/src/lib/member-map-functions/map-with.ts
Lines 24 to 26 in 1331bbf
since if I use
mapper.mapArray
instead, it will work as I expected.To test that you could use this:
mapper/packages/integration-test/src/lib/with-classes/fixtures/profiles/user-profile.profile.ts
Lines 21 to 25 in 6187453
but changing
.avatar
to.addresses
,AvatarVm
toAddressVm
andAvatar
toAddress
(I didn't test this tbh)My use case is basically like this:
The text was updated successfully, but these errors were encountered: