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

Function invalidatesEntry

packages/effect/src/ui/Query.ts:1723–1738  ·  view source on GitHub ↗
(
  run: {
    readonly invalidates: ReadonlyArray<Target>
    readonly optimistic?: ReadonlyArray<Patch> | undefined
  },
  query: R,
  args: Args<R>
)

Source from the content-addressed store, hash-verified

1721 * @since 4.2.0
1722 */
1723export const invalidatesEntry = <R extends Query.Any>(
1724 run: {
1725 readonly invalidates: ReadonlyArray<Target>
1726 readonly optimistic?: ReadonlyArray<Patch> | undefined
1727 },
1728 query: R,
1729 args: Args<R>
1730): boolean => {
1731 const def = defOf(query)
1732 return targetsHit(
1733 compileTargets(run.invalidates, run.optimistic),
1734 def.name,
1735 def.tags,
1736 def.argsKey(args)
1737 )
1738}
1739
1740/**
1741 * What started a fetch. Every fetch records exactly one, and the fetcher

Callers

nothing calls this directly

Calls 3

defOfFunction · 0.85
targetsHitFunction · 0.85
compileTargetsFunction · 0.85

Tested by

no test coverage detected