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

Function listHasMoreOf

packages/effect/src/ui/Query.ts:4702–4719  ·  view source on GitHub ↗
(entry: Entry)

Source from the content-addressed store, hash-verified

4700}
4701
4702const listHasMoreOf = (entry: Entry): boolean => {
4703 const result = entry.result
4704 if (result === undefined || result._tag !== "Success") return false
4705 if (entry.hasMore?.result === result) return entry.hasMore.value
4706 const pages = result.value as ReadonlyArray<unknown>
4707 let value = false
4708 if (pages.length > 0) {
4709 try {
4710 value = Option.isSome(
4711 entry.def.list!.next(pages[pages.length - 1], pages)
4712 )
4713 } catch {
4714 // A hydrated or seeded list: the walk that loads past it reports the defect.
4715 }
4716 }
4717 entry.hasMore = { result, value }
4718 return value
4719}
4720
4721const listMoreOf = (entry: Entry): More<any> => {
4722 if (

Callers 4

listMoreOfFunction · 0.85
listLoadedMoreFunction · 0.85
listStartFunction · 0.85
Query.tsFile · 0.85

Calls 1

nextMethod · 0.65

Tested by

no test coverage detected