Skip to content

All new TypeScript support!

Choose a tag to compare

@mesqueeb mesqueeb released this 14 Feb 08:17

Better TypeScript support 🦄

I have greatly improve the TypeScript support. Your merged values will now carry over the actually merged interfaces:

Screenshot 2020-02-14 at 13 30 37

v3.0 breaking changes

  • only named exports
// before:
import merge from 'merge-anything'

// now:
import { merge } from 'merge-anything'
  • now you can only pass objects into merge(), as opposed to arrays and other types.

  • custom compare & replace functions have slight changes:

Please see the new documentation on compare functions. Compare functions are now only triggered when a value is actually overwritten, not for the values on the first object passed that are never overwritten.