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

Function decodeRaw

packages/effect/src/ui/Query.ts:4473–4481  ·  view source on GitHub ↗
(def: QueryDef, tuple: RawTuple)

Source from the content-addressed store, hash-verified

4471 }
4472
4473 const decodeRaw = (def: QueryDef, tuple: RawTuple): unknown => {
4474 const decoded = decodeOf(def, tuple)
4475 if (decoded._tag === "Pending") {
4476 if (swept && decoded.waiters === 0) cancel(tuple, decoded)
4477 throw new Error("async success decoder")
4478 }
4479 if (Exit.isFailure(decoded)) throw Cause.squash(decoded.cause)
4480 return decoded.value
4481 }
4482
4483 const cancelPending = (all: boolean): void => {
4484 swept = true

Callers 2

registerFunction · 0.85
hydrateFunction · 0.85

Calls 11

decodeOfFunction · 0.85
ensureEntryFunction · 0.85
afterQuietFunction · 0.85
cancelFunction · 0.70
reportFunction · 0.70
quoteFunction · 0.70
lookupFunction · 0.70
getMethod · 0.65
deleteMethod · 0.65
mapMethod · 0.45
decodeErrorMethod · 0.45

Tested by

no test coverage detected