MCPcopy Create free account
hub / github.com/Effect-TS/effect / applyPatch

Function applyPatch

packages/effect/src/ui/Query.ts:2955–2965  ·  view source on GitHub ↗
(
  patch: Patch,
  name: string,
  argsKey: string,
  args: unknown,
  value: unknown
)

Source from the content-addressed store, hash-verified

2953 * of another entry leaves it as it is.
2954 */
2955const applyPatch = (
2956 patch: Patch,
2957 name: string,
2958 argsKey: string,
2959 args: unknown,
2960 value: unknown
2961): unknown => {
2962 if (defOf(patch.query).name !== name) return value
2963 if (patch._tag === "PatchAll") return patch.patch(value, args)
2964 return argsKeyOf(patch) === argsKey ? patch.patch(value) : value
2965}
2966
2967// -----------------------------------------------------------------------------
2968// Builds: which Layer build owns a fetch

Callers 3

applyPatchesFunction · 0.85
patchedViewOfFunction · 0.85
beginRunFunction · 0.85

Calls 3

defOfFunction · 0.85
argsKeyOfFunction · 0.85
patchMethod · 0.65

Tested by

no test coverage detected