/** * Combines this differ and the specified differ to produce a differ that * knows how to diff the sum of their values. * * @tsplus static Differ.Aspects orElseEither * @tsplus pipeable Differ orElseEither */ export function orElseEither(that: Differ) { return ( self: Differ ): Differ, Differ.Or.Patch> => Differ.make({ empty: Differ.Or.empty(), combine: (first, second) => first.combine(second), diff: (oldValue, newValue) => Differ.Or.diff(oldValue, newValue, self, that), patch: (patch, oldValue) => patch.apply(oldValue, self, that) }) }