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

Function peek

packages/effect/src/ui/Query.ts:6431–6443  ·  view source on GitHub ↗
(def, args)

Source from the content-addressed store, hash-verified

6429 }
6430
6431 const peek: CacheInternals["peek"] = (def, args) => {
6432 const registered = register(def)
6433 const argsKey = registered.argsKey(args)
6434 let entry = lookup(registered, argsKey)
6435 if (entry === undefined) {
6436 // Only a saved value makes an entry here. It idles out like any other.
6437 const saved = savedOf(registered, argsKey)
6438 if (saved !== undefined) {
6439 afterQuiet(entry = ensureEntry(registered, args, argsKey, saved))
6440 }
6441 }
6442 return entry === undefined ? AsyncResult.initial() : view(entry)
6443 }
6444
6445 /** Waits for a caller-only fetch, joining the one in flight. */
6446 const getShared = (entry: Entry, build: Build): Effect.Effect<any, any> =>

Callers

nothing calls this directly

Calls 7

savedOfFunction · 0.85
afterQuietFunction · 0.85
ensureEntryFunction · 0.85
initialMethod · 0.80
registerFunction · 0.70
lookupFunction · 0.70
viewFunction · 0.70

Tested by

no test coverage detected