MCPcopy Index your code
hub / github.com/Effect-TS/effect / make

Function make

packages/effect/src/internal/differ.ts:33–47  ·  view source on GitHub ↗
(
  params: {
    readonly empty: Patch
    readonly diff: (oldValue: Value, newValue: Value) => Patch
    readonly combine: (first: Patch, second: Patch) => Patch
    readonly patch: (patch: Patch, oldValue: Value) => Value
  }
)

Source from the content-addressed store, hash-verified

31
32/** @internal */
33export const make = <Value, Patch>(
34 params: {
35 readonly empty: Patch
36 readonly diff: (oldValue: Value, newValue: Value) => Patch
37 readonly combine: (first: Patch, second: Patch) => Patch
38 readonly patch: (patch: Patch, oldValue: Value) => Value
39 }
40): Differ.Differ<Value, Patch> => {
41 const differ = Object.create(DifferProto)
42 differ.empty = params.empty
43 differ.diff = params.diff
44 differ.combine = params.combine
45 differ.patch = params.patch
46 return differ
47}
48
49/** @internal */
50export const environment = <A>(): Differ.Differ<Context<A>, Differ.Differ.Context.Patch<A, A>> =>

Callers 7

environmentFunction · 0.70
chunkFunction · 0.70
hashMapFunction · 0.70
hashSetFunction · 0.70
differ.tsFile · 0.70
readonlyArrayFunction · 0.70
updateWithFunction · 0.70

Calls 1

createMethod · 0.80

Tested by

no test coverage detected