-
-
Notifications
You must be signed in to change notification settings - Fork 146
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom merge types #318
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
馃崺 Feature Request
I am working on a typesafe merge library, and I want to support special merge modes for arrays (e.g. concat)
So in runtime code will looks like
merge({a: [{b: 1}, {c: 2}]}, {a: merge.ArrayConcat([{d: 3}])})
And result will be
{a: [{b: 1}, {c: 2}, {d: 3}]}
One way to achieve such type is to use the
L.Assign
type but withL.Merge
with custom basic merger likeHere
DefaultMerge
is what the library uses right now to merge objects.I am quite new to TypeScript and maybe you know a better solution for this problem?
The text was updated successfully, but these errors were encountered: