| 116 | |
| 117 | /** @internal */ |
| 118 | export const readonlyArray = <Value, Patch>( |
| 119 | differ: Differ.Differ<Value, Patch> |
| 120 | ): Differ.Differ<ReadonlyArray<Value>, Differ.Differ.ReadonlyArray.Patch<Value, Patch>> => |
| 121 | make({ |
| 122 | empty: ReadonlyArrayPatch.empty(), |
| 123 | combine: (first, second) => ReadonlyArrayPatch.combine(first, second), |
| 124 | diff: (oldValue, newValue) => ReadonlyArrayPatch.diff({ oldValue, newValue, differ }), |
| 125 | patch: (patch, oldValue) => ReadonlyArrayPatch.patch(patch, oldValue, differ) |
| 126 | }) |
| 127 | |
| 128 | /** @internal */ |
| 129 | export const transform = Dual.dual< |