phetsims / phet-core

Core utilities used by all PhET simulations.
MIT License
8 stars 6 forks source link

How will we model the types of merge? #91

Closed samreid closed 2 years ago

samreid commented 3 years ago

From https://github.com/phetsims/chipper/issues/1047.

I also noticed lodash provides types for _.merge:

Here is the merge with 4 merge sources:

merge<TObject, TSource1, TSource2, TSource3, TSource4>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): TObject & TSource1 & TSource2 & TSource3 & TSource4;

But lodash gives up after 4 merge sources:

merge(object: any, ...otherArgs: any[]): any;
samreid commented 2 years ago

There is more progress in https://github.com/phetsims/chipper/issues/1094, closing as duplicate.