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

Function isShipped

packages/effect/src/ui/Query.ts:3561–3571  ·  view source on GitHub ↗
(
  ctx: Context.Context<never>,
  def: QueryDef,
  argsKey: string,
  result: Settled
)

Source from the content-addressed store, hash-verified

3559 })
3560
3561const isShipped = (
3562 ctx: Context.Context<never>,
3563 def: QueryDef,
3564 argsKey: string,
3565 result: Settled
3566): boolean => {
3567 if (result._tag !== "Success") return false
3568 const shipped = Context.get(ctx, queryCore.Shipped)?.peek(def, argsKey)
3569 return shipped !== undefined && shipped.value === result.value &&
3570 shipped.timestamp === result.timestamp
3571}
3572
3573/** Checks a snapshot against the query's Schemas, the type parameters. */
3574const snapshotRun = (def: QueryDef, label: string, decoding: boolean) => {

Callers 2

snapshotRunFunction · 0.85
snapshotWireFunction · 0.85

Calls 2

peekMethod · 0.65
getMethod · 0.65

Tested by

no test coverage detected