There was a mismatch between type and runtime behavior of mergeObjects as shown here:
const a = { a: 1, b: 2 }
const b = { b: true }
const c = mergeObjects([a, b]) // should behave like { ...a, ...b }
// ˆ? { a: number, b: never }
This PR fixes it according to what we would expect: { a: number, b: boolean }. It also enforces the correct parameter types with TS: DomainFunction<string, unknown>[]
…e regression tests.
Reasoning
There was a mismatch between type and runtime behavior of
mergeObjects
as shown here:This PR fixes it according to what we would expect:
{ a: number, b: boolean }
. It also enforces the correct parameter types with TS:DomainFunction<string, unknown>[]
This bug was mentioned in #66