deepmerge icon indicating copy to clipboard operation
deepmerge copied to clipboard

The reason behind the `all` option

Open songkeys opened this issue 2 years ago • 3 comments

Prerequisites

  • [X] I have written a descriptive issue title
  • [X] I have searched existing issues to ensure the issue has not already been raised

Issue

I'm curious about the purpose of the all option. From the code, it appears that _deepmergeAll is the same as _deepmerge when two arguments are present, but can also be used for other n-argument cases. Could we use _deepmergeAll as the default option? Have I overlooked something?

songkeys avatar May 10 '23 03:05 songkeys

The typescript typings are recursively determining the final object shape and thus can slow down your typescript transpilation and your IDE, like vscode.

Uzlopak avatar May 10 '23 06:05 Uzlopak

Oh yes. I forgot about the typescript typing. Is ...args: T[] an option to solve this alternatively btw?

Meanwhile I think we should state clearly in the doc. The current description is too vague about this option.

songkeys avatar May 10 '23 11:05 songkeys

You can provide a PR if you like.

Uzlopak avatar May 10 '23 12:05 Uzlopak